text
stringlengths
11
6.3k
embedding
listlengths
768
768
func TestGetSlidesPlaceholderInvalidpassword(t *testing.T) { request := createGetSlidesPlaceholderRequest() request.password = invalidizeTestParamValue(request.password, "password", "string").(string) e := initializeTest("GetSlidesPlaceholder", "password", request.password) if e != nil { t.Errorf...
[ 0.3334977924823761, 0.504891574382782, 0.2472594678401947, 0.03832986205816269, 0.05667868256568909, 0.6302109956741333, 0.23270036280155182, 0.2641710638999939, 0.5598444938659668, -0.3321530818939209, -0.13555867969989777, 0.3380977213382721, -0.8516109585762024, 0.48350948095321655, -...
func TestGetSlidesPlaceholderInvalidfolder(t *testing.T) { request := createGetSlidesPlaceholderRequest() request.folder = invalidizeTestParamValue(request.folder, "folder", "string").(string) e := initializeTest("GetSlidesPlaceholder", "folder", request.folder) if e != nil { t.Errorf("Error: %v....
[ -0.06509529799222946, 0.7895283102989197, 0.2657810151576996, -0.2927168309688568, 0.22730901837348938, 0.8465951085090637, 0.32934102416038513, 0.19370299577713013, -0.20831668376922607, -0.8245429396629333, 0.312692791223526, 0.42420607805252075, -0.8522488474845886, 0.821316659450531, ...
func TestGetSlidesPlaceholderInvalidstorage(t *testing.T) { request := createGetSlidesPlaceholderRequest() request.storage = invalidizeTestParamValue(request.storage, "storage", "string").(string) e := initializeTest("GetSlidesPlaceholder", "storage", request.storage) if e != nil { t.Errorf("Erro...
[ 0.25074467062950134, 0.5831803679466248, 0.30736243724823, 0.01378844864666462, 0.44494590163230896, 0.4254225194454193, 0.15309306979179382, -0.24755528569221497, 0.19149650633335114, -0.4392167329788208, -0.06848608702421188, 0.25918707251548767, -0.38961678743362427, 0.03230974078178406...
func TestGetSlidesPlaceholders(t *testing.T) { request := createGetSlidesPlaceholdersRequest() e := initializeTest("GetSlidesPlaceholders", "", "") if e != nil { t.Errorf("Error: %v.", e) return } c := getTestApiClient() r, _, e := c.PlaceholdersApi.GetSlidesPlaceholders(request) ...
[ 0.024491310119628906, 0.9270540475845337, 0.5041977167129517, -0.17803002893924713, 0.5373154878616333, 0.7757250666618347, 0.23629046976566315, -0.7192310690879822, 0.3966556191444397, -0.46412062644958496, -0.6818349957466125, 0.222439244389534, -0.9327459335327148, 0.24158263206481934, ...
func TestGetSlidesPlaceholdersInvalidname(t *testing.T) { request := createGetSlidesPlaceholdersRequest() request.name = invalidizeTestParamValue(request.name, "name", "string").(string) e := initializeTest("GetSlidesPlaceholders", "name", request.name) if e != nil { t.Errorf("Error: %v.", e) ...
[ 0.1961037665605545, 0.49332350492477417, 0.3649601340293884, -0.18066486716270447, -0.05271173641085625, 0.683116614818573, -0.2858797609806061, -0.6322482824325562, 0.22701357305049896, -0.25298815965652466, -0.4877527952194214, 0.12148787826299667, -0.824373185634613, 0.6610119938850403,...
func TestGetSlidesPlaceholdersInvalidslideIndex(t *testing.T) { request := createGetSlidesPlaceholdersRequest() request.slideIndex = invalidizeTestParamValue(request.slideIndex, "slideIndex", "int32").(int32) e := initializeTest("GetSlidesPlaceholders", "slideIndex", request.slideIndex) if e != nil { ...
[ -0.1229429841041565, 0.7523240447044373, 0.3262334167957306, -0.36561575531959534, 0.5129697322845459, 0.7777803540229797, 0.0655696913599968, -0.4619293212890625, 0.44456711411476135, -0.5906415581703186, -0.4355684220790863, 0.18674175441265106, -0.7766252756118774, -0.05616443604230881,...
func TestGetSlidesPlaceholdersInvalidpassword(t *testing.T) { request := createGetSlidesPlaceholdersRequest() request.password = invalidizeTestParamValue(request.password, "password", "string").(string) e := initializeTest("GetSlidesPlaceholders", "password", request.password) if e != nil { t.Err...
[ 0.199123352766037, 0.506345272064209, 0.2818756401538849, 0.2824673056602478, 0.20237930119037628, 0.6776925325393677, 0.027406930923461914, 0.041012365370988846, 0.5892069339752197, -0.3490469753742218, -0.19344472885131836, 0.12188223004341125, -1.0732603073120117, 0.7562131881713867, ...
func TestGetSlidesPlaceholdersInvalidfolder(t *testing.T) { request := createGetSlidesPlaceholdersRequest() request.folder = invalidizeTestParamValue(request.folder, "folder", "string").(string) e := initializeTest("GetSlidesPlaceholders", "folder", request.folder) if e != nil { t.Errorf("Error: ...
[ -0.1352774202823639, 0.808091402053833, 0.3195440471172333, -0.06504549086093903, 0.35324496030807495, 0.9033493399620056, 0.10265854001045227, 0.0960567444562912, -0.18897277116775513, -0.7289145588874817, 0.2312488555908203, 0.26843589544296265, -1.0447982549667358, 1.0784227848052979, ...
func TestGetSlidesPlaceholdersInvalidstorage(t *testing.T) { request := createGetSlidesPlaceholdersRequest() request.storage = invalidizeTestParamValue(request.storage, "storage", "string").(string) e := initializeTest("GetSlidesPlaceholders", "storage", request.storage) if e != nil { t.Errorf("E...
[ 0.14041683077812195, 0.5615962147712708, 0.3492443561553955, 0.28604161739349365, 0.5753863453865051, 0.5088284611701965, -0.06228801608085632, -0.37543100118637085, 0.18401944637298584, -0.40613627433776855, -0.11343249678611755, 0.12699303030967712, -0.5668702125549316, 0.273462176322937...
func LoadHTTPS() http.Handler { return middleware(routes()) }
[ 0.5110747814178467, -0.0504649393260479, 0.43424633145332336, 0.06861066073179245, -1.2254973649978638, 0.05572701245546341, -1.056450605392456, -0.12109777331352234, 0.210812047123909, -0.4022434949874878, -0.09823263436555862, -0.9804977178573608, -0.7147397398948669, 0.5007307529449463,...
func LoadHTTP() http.Handler { return middleware(routes()) // Uncomment this and comment out the line above to always redirect to HTTPS //return http.HandlerFunc(redirectToHTTPS) }
[ 0.3766203820705414, 0.10705682635307312, 0.44097980856895447, 0.8287954926490784, -0.8211456537246704, 0.3505360186100006, -0.16879697144031525, 0.14023077487945557, 1.2028969526290894, -0.08758910000324249, 0.3277633786201477, -0.35742905735969543, 0.12962301075458527, 0.1790984570980072,...
func (o OwnershipLevel) Less(oo OwnershipLevel) bool { if o == OwnershipLevels.Lender && oo == OwnershipLevels.Owner { return true } return false }
[ 0.163340762257576, -0.7169607877731323, 0.6869423985481262, -0.08659283071756363, -0.7118644714355469, 0.32696062326431274, -0.2623646855354309, -1.362816333770752, 0.6890227794647217, -0.8199719786643982, 0.3048687279224396, 0.3625467121601105, -0.4418516755104065, 0.7785663604736328, -...
func (o OwnershipLevel) String() string { return string(o) }
[ 0.28789228200912476, -1.3634045124053955, 0.016185034066438675, 0.4122713506221771, -0.421678751707077, 0.8979403972625732, 0.7061521410942078, -1.5403838157653809, -0.06475090980529785, -0.45384231209754944, -0.024841206148266792, 0.695331335067749, 0.032323192805051804, -0.75551325082778...
func (a Action) All() bool { return a.String() == "*" }
[ 0.3507411479949951, -1.0787129402160645, 0.4325960874557495, 1.601466178894043, 0.20759868621826172, 0.43403077125549316, -0.6547159552574158, 0.9490033984184265, 0.07986290752887726, 0.6744970083236694, 0.37947195768356323, 1.4096248149871826, -0.198118656873703, 0.6249694228172302, -1....
func (a Action) String() string { return string(a) }
[ -0.12086063623428345, -1.462345838546753, -0.07896722108125687, -0.09193339198827744, -0.12718400359153748, 0.4608173966407776, 0.9249332547187805, -0.978460431098938, 0.5315061807632446, 0.14175376296043396, 0.09167351573705673, 1.3876383304595947, 0.29221832752227783, 0.07029737532138824...
func BuildResourceHierarchy(rh string) ResourceHierarchy { return ResourceHierarchy(rh) }
[ -0.8606491088867188, -0.8998700976371765, 0.022247035056352615, 0.27073901891708374, -0.8175131678581238, 0.19145061075687408, 0.033346522599458694, 0.1282765418291092, 0.3134588599205017, -0.6126651167869568, -0.270938903093338, -0.37905046343803406, -0.9701116681098938, 0.689524352550506...
func (rh ResourceHierarchy) All() bool { return string(rh) == "*" }
[ 0.5138015747070312, -1.168505311012268, 0.5054718255996704, 1.1596107482910156, 0.24824364483356476, 0.993112325668335, -0.7127954363822937, 0.9558053016662598, -0.32088667154312134, -0.012633430771529675, 0.14552927017211914, 0.5351774096488953, -0.6303562521934509, 1.2158008813858032, ...
func (rh ResourceHierarchy) PermissionMatches() []string { whole := string(rh) if whole == "*" { return []string{whole} } parts := strings.Split(whole, "::") ret := []string{"*"} for i := 1; i < len(parts); i++ { if parts[i] == "*" { break } match := strings.Join(parts[:i], "::") ret = append(ret, ma...
[ -0.20061255991458893, -0.6459031701087952, 0.8491629958152771, 1.09371817111969, -0.638741135597229, 0.039824020117521286, 0.02028089016675949, 0.7601374387741089, 0.007209778763353825, 0.9324692487716675, 0.5534593462944031, -0.6011722683906555, -1.5036996603012085, -0.10965130478143692, ...
func (rh ResourceHierarchy) Contains(orh ResourceHierarchy) bool { rhh := buildResourceHierarchy(rh) orhh := buildResourceHierarchy(orh) if rhh.size > orhh.size { return false } for i := range orhh.hierarchy { if i >= len(rhh.hierarchy) { return false } if rhh.hierarchy[i] == "*" { return true } ...
[ -0.16358859837055206, -0.933899462223053, 0.6586413979530334, -0.2237607091665268, -0.5871362090110779, 0.09960763156414032, -0.1353055089712143, -0.3991234004497528, 0.1674434095621109, -0.37453290820121765, 0.036512717604637146, 0.22111712396144867, -0.634282648563385, 0.8479753136634827...
func (rh ResourceHierarchy) String() string { return string(rh) }
[ 0.06539982557296753, -1.2321982383728027, 0.1321166306734085, -0.145219087600708, -0.01704338565468788, 1.0390756130218506, 0.3694564700126648, -1.1511847972869873, -0.11541663110256195, -0.3305344581604004, 0.037773337215185165, 0.35929369926452637, -0.623453676700592, 0.6722422242164612,...
func ValidatePermission(str string) (bool, error) { // Format: OwnershipLevel::Action::Service::{ResourceHierarchy} parts := strings.Split(str, "::") if len(parts) < 4 { return false, fmt.Errorf( "Incomplete permission. Expected format: " + "Service::OwnershipLevel::Action::{ResourceHierarchy}", ) } ol ...
[ -0.4397885799407959, -0.7050006985664368, 0.7734299302101135, 0.5013214349746704, -0.22563418745994568, 0.0876115933060646, 0.36715167760849, -0.6292567253112793, 0.2568851709365845, 0.4943731725215912, 0.780403196811676, -0.5833078622817993, -0.9940940141677856, 0.18024463951587677, 0.4...
func BuildPermission(str string) (Permission, error) { if valid, err := ValidatePermission(str); !valid { return Permission{}, err } parts := strings.Split(str, "::") service := parts[0] ol := OwnershipLevel(parts[1]) action := BuildAction(parts[2]) rh := ResourceHierarchy(strings.Join(parts[3:], "::")) retur...
[ -0.42344391345977783, -0.9999731183052063, 0.47860023379325867, 0.7949751019477844, -0.6021806001663208, -0.30543074011802673, 0.1707734763622284, 0.28255707025527954, 0.16357791423797607, 0.030343374237418175, 0.08235829323530197, -0.06320682168006897, -0.6171784996986389, -1.134837269783...
func BuildPermissions(ps []string) ([]Permission, error) { pSl := make([]Permission, len(ps)) var err error for i := range ps { pSl[i], err = BuildPermission(ps[i]) if err != nil { return nil, err } } return pSl, nil }
[ -1.2675018310546875, 0.1345483362674713, 0.5212307572364807, 1.3045343160629272, 0.5486706495285034, 0.028899291530251503, -0.13055193424224854, -0.032535433769226074, 0.033817972987890244, 0.33840411901474, 0.17519596219062805, -1.0189573764801025, -0.7332953810691833, 0.13723739981651306...
func (p Permission) IsPresent(permissions []Permission) bool { for _, pp := range permissions { if (pp.Service != "*" && pp.Service != p.Service) || (pp.Action != "*" && pp.Action != p.Action) || pp.OwnershipLevel.Less(p.OwnershipLevel) { continue } if pp.ResourceHierarchy.Contains(p.ResourceHierarchy) ...
[ -0.439134806394577, -0.7367812991142273, 0.9103268384933472, 0.5526259541511536, 0.5019165873527527, 0.3209807574748993, -0.47124025225639343, 0.314752459526062, 0.3790302276611328, 0.7620630860328674, 1.2105008363723755, -0.15598294138908386, -1.1986792087554932, 0.7154757380485535, -0....
func (p Permission) String() string { return fmt.Sprintf( "%s::%s::%s::%s", p.Service, p.OwnershipLevel, p.Action, string(p.ResourceHierarchy), ) }
[ 0.27400490641593933, -1.3966871500015259, 0.4427850842475891, 0.30494531989097595, -0.5101324915885925, 0.332386314868927, 0.15095530450344086, -0.852764904499054, -0.6119179129600525, 0.4967264235019684, 0.6711201071739197, 0.27768537402153015, -0.5021547675132751, -0.7675656080245972, ...
func (p Permission) HasServiceFullAccess() bool { if !p.Action.All() { return false } return p.ResourceHierarchy.All() }
[ 0.0903397798538208, 0.37459325790405273, 0.44837677478790283, 0.5640183091163635, 0.23805129528045654, -1.1030789613723755, 0.48815101385116577, 0.30618688464164734, 0.4760216474533081, -0.6030696630477905, 0.41415780782699585, -0.02681540884077549, 0.18846267461776733, 2.0412676334381104,...
func (p Permission) HasServiceFullOwnership() bool { return p.HasServiceFullAccess() && p.OwnershipLevel == OwnershipLevels.Owner }
[ -0.13358132541179657, 0.3174413740634918, 0.46848663687705994, 1.1905860900878906, -0.21087244153022766, -1.1671760082244873, -0.07625605911016464, 0.03245069831609726, 0.7210347056388855, -0.6217997074127197, 0.10213812440633774, -0.12994356453418732, 0.46395328640937805, 0.68850427865982...
func buildWillIAMPermission(ro OwnershipLevel, action, rh string) string { return fmt.Sprintf( "%s::%s::%s::%s", constants.AppInfo.Name, string(ro), action, rh, ) }
[ 0.13116618990898132, -1.710418462753296, 0.6479455828666687, -0.13911660015583038, -0.5407629609107971, -0.20477235317230225, -0.30657339096069336, 0.29342788457870483, 0.6048460602760315, 0.5660647749900818, 0.33485108613967896, 0.4883536100387573, -0.3490046560764313, -0.578623354434967,...
func BuildWillIAMPermissionLender(action, rh string) string { return buildWillIAMPermission(OwnershipLevels.Lender, action, rh) }
[ -0.030704258009791374, -0.7796384692192078, 0.39812934398651123, 0.005911716725677252, -0.8872952461242676, -0.06422872841358185, -1.1406906843185425, 0.19214215874671936, 1.0679867267608643, 0.08608926832675934, 0.8086575865745544, 0.9651491045951843, -1.1510343551635742, 0.90501499176025...
func BuildWillIAMPermissionOwner(action, rh string) string { return buildWillIAMPermission(OwnershipLevels.Owner, action, rh) }
[ 0.17437531054019928, -0.7213969230651855, 0.31881698966026306, 0.992304801940918, -1.3752259016036987, -0.5035273432731628, 0.2701527178287506, 0.08396685868501663, 0.9354252219200134, -0.14909020066261292, 0.5653116106987, 0.5394677519798279, -0.31746435165405273, -0.4563003480434418, 0...
func (s *TickerSession) BulkInsertTrades(ctx context.Context, trades []Trade) (err error) { if len(trades) <= 50 { return performInsertTrades(ctx, s, trades) } chunks := chunkifyDBTrades(trades, 50) for _, chunk := range chunks { err = performInsertTrades(ctx, s, chunk) if err != nil { return } } ret...
[ -0.7728844881057739, 1.8719301223754883, 0.3041967749595642, -0.23751142621040344, 1.2972488403320312, -0.6204688549041748, 0.3785327970981598, -0.7853580117225647, 0.5207890868186951, 0.39555516839027405, -0.926143229007721, 0.5431239008903503, -1.2328821420669556, 0.7856330871582031, -...
func (s *TickerSession) GetLastTrade(ctx context.Context) (trade Trade, err error) { err = s.GetRaw(ctx, &trade, "SELECT * FROM trades ORDER BY ledger_close_time DESC LIMIT 1") return }
[ 0.03579697385430336, 0.5161100029945374, 0.47024238109588623, -0.4235484004020691, 1.1309521198272705, -0.2109650820493698, -0.4963808059692383, -1.3008953332901, 0.0715579241514206, -0.7848596572875977, 0.33493781089782715, 0.3578282296657562, -0.7771471738815308, -0.3773867189884186, -...
func (s *TickerSession) DeleteOldTrades(ctx context.Context, minDate time.Time) error { _, err := s.ExecRaw(ctx, "DELETE FROM trades WHERE ledger_close_time < ?", minDate) return err }
[ 0.38024309277534485, 0.9740182161331177, 0.6348026394844055, -0.5813663005828857, -0.17644862830638885, 0.22892241179943085, 0.06602960079908371, -1.0194525718688965, -0.01488429680466652, 0.3642898201942444, -0.237948477268219, 0.46662214398384094, -0.8571093678474426, 0.3481736481189728,...
func chunkifyDBTrades(sl []Trade, chunkSize int) [][]Trade { var chunkedSlice [][]Trade numChunks := int(math.Ceil(float64(len(sl)) / float64(chunkSize))) start := 0 length := len(sl) for i := 0; i < numChunks; i++ { end := start + chunkSize if end > length { end = length } chunk := sl[start:end] c...
[ -0.35901156067848206, 0.7089057564735413, 0.6703596115112305, -0.24170324206352234, 0.4303875267505646, -0.43413877487182617, 0.07505888491868973, -0.6815640926361084, 0.07461293041706085, 0.6578482389450073, -0.2772897481918335, 1.2561795711517334, -0.8606873750686646, 0.40885037183761597...
func (m *Master) Echo(req *VRequest, resp *VResponse) error { status := req.JobStatus pid := req.Pid if m.getDoneReduceTaskNum() == m.NReduce { //Job finished resp.JobType = JOB_TYPE_EXIT m.ExitChan <- 1 return nil } if status == -999 { //task error if info, ok := m.MapTask[req.TaskNum]; ok && info.Pid == ...
[ -0.481553852558136, -0.7337638735771179, 1.153911828994751, 0.2544078826904297, -0.38906538486480713, -0.00933340098708868, 0.20240744948387146, 0.05285688489675522, -0.20977553725242615, 0.1367175281047821, -0.5506982207298279, -0.33925551176071167, 0.09255975484848022, 0.5936756730079651...
func (m *Master) Example(args *ExampleArgs, reply *ExampleReply) error { reply.Y = args.X + 1 time.Sleep(time.Second * 3) return nil }
[ 0.6298561692237854, 0.5705315470695496, 0.4499877393245697, 0.0032811067067086697, -0.1852247416973114, 0.3760262131690979, -0.10592620074748993, 0.6965612769126892, 0.2599616050720215, 0.4311217963695526, -1.3099102973937988, 1.2315319776535034, -0.3474652171134949, -0.5239861011505127, ...
func (m *Master) server() { rpc.Register(m) rpc.HandleHTTP() //l, e := net.Listen("tcp", ":1234") sockname := masterSock() os.Remove(sockname) l, e := net.Listen("unix", sockname) if e != nil { log.Fatal("listen error:", e) } go http.Serve(l, nil) }
[ -0.5627836585044861, -0.3185119032859802, 0.6255593299865723, -0.08582790940999985, 1.1791318655014038, 0.8106944561004639, -0.047648731619119644, 1.27376389503479, -0.7720423936843872, -0.20754043757915497, -0.914108395576477, 0.10757902264595032, -1.1161320209503174, 1.0134865045547485, ...
func (m *Master) Done() bool { ret := false // Your code here. if len(m.DoneReduceTask) == m.NReduce { ret = true } return ret }
[ -0.7594609260559082, 1.0015678405761719, 0.8681238889694214, 1.2743841409683228, -0.16985273361206055, 0.22086408734321594, 0.13728107511997223, 0.525702953338623, 0.08219655603170395, -0.46571293473243713, -1.2545089721679688, -0.33219683170318604, -0.7078433632850647, 0.7922369241714478,...
func MakeMaster(files []string, nReduce int) *Master { m := Master{ NMap: len(files), NReduce: nReduce, files: files, MapTask: make(map[int]*TaskInfo), ReduceTask: make(map[int]*TaskInfo), DoneMapTask: []int{}, DoneReduceTask: []int{}, ExitChan: make(chan i...
[ -0.8927162885665894, -0.1393863707780838, 0.7833453416824341, 0.16927483677864075, -0.6068751811981201, -0.15460729598999023, 0.18110240995883942, 0.24859510362148285, -0.0359833650290966, -0.44809025526046753, -0.7923747897148132, -0.6329924464225769, -0.16833844780921936, 0.3185835182666...
func (o *SetAmountReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewSetAmountOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 401: ...
[ -0.14536848664283752, -0.87191241979599, 0.5672119855880737, 0.6417421102523804, -0.43413206934928894, -1.015682578086853, -0.2441810518503189, -0.5935293436050415, 0.5450642108917236, 0.6632934808731079, 0.4602944850921631, -0.18089471757411957, -0.37445372343063354, 0.0473165437579155, ...
func NewSetAmountOK() *SetAmountOK { return &SetAmountOK{} }
[ 0.3040255308151245, -0.7738369107246399, 0.1186695247888565, 1.394911289215088, -1.5201797485351562, -0.07726266980171204, 0.4184566140174866, -0.24271662533283234, -0.03066946752369404, 1.1516298055648804, -0.03962535038590431, -0.2909369468688965, 0.8651347160339355, 0.9857861399650574, ...
func NewSetAmountUnauthorized() *SetAmountUnauthorized { return &SetAmountUnauthorized{} }
[ -0.7167748212814331, -0.29410240054130554, -0.0322808213531971, 0.9012590646743774, -1.7574849128723145, -0.6261386275291443, -0.5529568195343018, 0.37492281198501587, 0.21414664387702942, -0.4529973864555359, -0.49510860443115234, 0.9189748167991638, 0.4981571435928345, -0.057055950164794...
func NewSetAmountForbidden() *SetAmountForbidden { return &SetAmountForbidden{} }
[ 1.0397316217422485, 0.1521744579076767, 0.22143858671188354, 1.272057056427002, -1.6185535192489624, -0.17270325124263763, -0.21433928608894348, -0.827927827835083, -0.05429621785879135, -0.04148783162236214, -0.7639433145523071, 0.41311922669410706, 0.4834038019180298, 0.00224101543426513...
func NewHandler(ctx context.Context, endpoints endpoints.Endpoints, tracer stdopentracing.Tracer, logger log.Logger) pb.VaultServer { options := []grpctransport.ServerOption{ grpctransport.ServerErrorLogger(logger), } return &grpcServer{ initstatus: grpctransport.NewServer( ctx, endpoints.InitStatusEndpoin...
[ -0.1605377197265625, -0.057063791900873184, 0.6118441820144653, 0.3886919319629669, 0.44453367590904236, 0.5764780640602112, 1.0070382356643677, -0.7492178082466125, 0.3190125524997711, -0.1166248470544815, 0.24706381559371948, 0.17028464376926422, 0.010893749073147774, -0.1197986379265785...
func DecodeInitStatusRequest(_ context.Context, grpcReq interface{}) (interface{}, error) { return endpoints.InitStatusRequest{}, nil }
[ -1.3148729801177979, -0.6905204653739929, 0.38525494933128357, -0.12836341559886932, -0.1676424741744995, -0.35073038935661316, 0.04058301821351051, 0.3299228549003601, -0.5293208956718445, -0.18439596891403198, -0.9589109420776367, 0.9125801920890808, -0.44914811849594116, 0.5668098330497...
func DecodeInitStatusResponse(_ context.Context, grpcReply interface{}) (interface{}, error) { reply := grpcReply.(*pb.InitStatusResponse) return endpoints.InitStatusResponse{Initialized: bool(reply.Status.Initialized), Err: service.String2Error(reply.Err)}, nil }
[ -0.6682812571525574, -1.210296392440796, 0.34001028537750244, -0.6805042624473572, 0.38357463479042053, -0.6872802376747131, -0.050245579332113266, -0.14244869351387024, 0.5870940685272217, -0.03227214887738228, -1.4654366970062256, 0.43348678946495056, -1.1587696075439453, -0.185500144958...
func EncodeInitStatusResponse(_ context.Context, response interface{}) (interface{}, error) { resp := response.(endpoints.InitStatusResponse) status := &pb.Status{Initialized: bool(resp.Initialized)} return &pb.InitStatusResponse{Status: status, Err: service.Error2String(resp.Err)}, nil }
[ -0.7174930572509766, -1.3290684223175049, 0.11863958835601807, -0.04337324947118759, -0.006554382853209972, -0.20603401958942413, -0.39857178926467896, -0.3439248204231262, 0.825859010219574, 0.17363674938678741, -1.3904831409454346, 0.42758822441101074, -0.9420855641365051, 0.347306370735...
func EncodeInitStatusRequest(_ context.Context, request interface{}) (interface{}, error) { return &pb.InitStatusRequest{}, nil }
[ -1.3068383932113647, -0.40341711044311523, 0.34971097111701965, 0.5647571086883545, -0.3024786710739136, 0.44745761156082153, -0.5071662664413452, -0.5747633576393127, -0.25845783948898315, 0.14848604798316956, -0.8833844065666199, 0.829757034778595, -0.5338920950889587, 1.270479679107666,...
func DecodeInitRequest(_ context.Context, grpcReq interface{}) (interface{}, error) { req := grpcReq.(*pb.InitRequest) opts := service.InitOptions{ SecretShares: int(req.SecretShares), SecretThreshold: int(req.SecretThreshold), StoredShares: int(req.StoredShares), PGPKeys: ...
[ -0.5385478734970093, -0.6478851437568665, 0.7950257062911987, -0.03441585227847099, 0.036735352128744125, -0.3000510632991791, -0.0745089128613472, 0.14600536227226257, -0.31775233149528503, -0.19757641851902008, -0.3154134452342987, 0.6970198750495911, -1.3935422897338867, -0.150914087891...
func DecodeInitResponse(_ context.Context, grpcReply interface{}) (interface{}, error) { reply := grpcReply.(*pb.InitResponse) init := service.InitKeys{ Keys: reply.Keys, KeysB64: reply.KeysBase64, RecoveryKeys: reply.RecoveryKeys, RecoveryKeysB64: reply.RecoveryKeysBase64, RootToken: ...
[ -0.7205682992935181, -1.4125269651412964, 0.5563206076622009, -0.6101266741752625, -0.12566035985946655, -0.8388515710830688, -0.07267078012228012, -0.34234341979026794, 0.29079729318618774, 0.08500279486179352, -1.1788305044174194, 0.22943386435508728, -1.7203364372253418, -0.799490272998...
func EncodeInitResponse(_ context.Context, response interface{}) (interface{}, error) { resp := response.(endpoints.InitResponse) return &pb.InitResponse{ Keys: resp.Init.Keys, KeysBase64: resp.Init.KeysB64, RecoveryKeys: resp.Init.RecoveryKeys, RecoveryKeysBase64: resp.Init.Recov...
[ -0.560568630695343, -1.5646142959594727, 0.3049207925796509, -0.07401047646999359, -0.17896214127540588, -0.3018961250782013, -0.5934737324714661, -0.4708600342273712, 0.7201870083808899, 0.13547541201114655, -0.9064733982086182, -0.059152115136384964, -1.642504096031189, -0.29245665669441...
func EncodeInitRequest(_ context.Context, request interface{}) (interface{}, error) { req := request.(endpoints.InitRequest) return &pb.InitRequest{ SecretShares: uint32(req.Opts.SecretShares), SecretThreshold: uint32(req.Opts.SecretThreshold), StoredShares: uint32(req.Opts.StoredShares)...
[ -0.6172638535499573, -0.4180207848548889, 0.6235777139663696, 0.3513290584087372, 0.22081118822097778, 0.4052726924419403, -0.3753838837146759, -0.5174915194511414, 0.33089226484298706, 0.21208728849887848, -0.39469268918037415, 0.6688317656517029, -1.3524218797683716, 0.09436612576246262,...
func DecodeSealStatusRequest(_ context.Context, grpcReq interface{}) (interface{}, error) { return endpoints.SealStatusRequest{}, nil }
[ -1.318038821220398, -0.34911835193634033, 0.5325116515159607, -0.7275029420852661, -0.2862401306629181, -0.10029853135347366, 0.41305825114250183, -0.02512204647064209, 0.8407251238822937, -0.4403044879436493, -0.16223780810832977, 0.6682645678520203, 0.3832121789455414, 0.8272686004638672...
func DecodeSealStatusResponse(_ context.Context, grpcReply interface{}) (interface{}, error) { reply := grpcReply.(*pb.SealStatusResponse) status := endpoints.SealStatusResponse{ Sealed: reply.SealStatus.Sealed, T: int(reply.SealStatus.T), N: int(reply.SealStatus.N), Progress: int(...
[ -0.7447947859764099, -1.2653710842132568, 0.44851550459861755, -1.1990872621536255, -0.09173092991113663, -0.2129533737897873, 0.06220322847366333, -0.3868049383163452, 1.4357833862304688, -0.06134859845042229, -1.0734707117080688, 0.5579419732093811, -0.714512050151825, -0.180534586310386...
func EncodeSealStatusResponse(_ context.Context, response interface{}) (interface{}, error) { resp := response.(endpoints.SealStatusResponse) status := &pb.SealStatus{ Sealed: resp.Sealed, T: uint32(resp.T), N: uint32(resp.N), Progress: uint32(resp.Progress), Version: resp.V...
[ -0.689120888710022, -1.2148722410202026, 0.3286895751953125, -0.6276624202728271, -0.37036484479904175, 0.2858193516731262, -0.12858250737190247, -0.5896819233894348, 1.842332124710083, 0.14862027764320374, -0.7503932118415833, 0.4634212553501129, -0.3989229202270508, 0.4868572950363159, ...
func EncodeSealStatusRequest(_ context.Context, request interface{}) (interface{}, error) { return &pb.SealStatusRequest{}, nil }
[ -1.2541248798370361, -0.2101868838071823, 0.5693730711936951, -0.2818564474582672, -0.49815890192985535, 0.5697889924049377, -0.07909645885229111, -0.6726763844490051, 1.3383527994155884, -0.034948188811540604, -0.08025659620761871, 0.4074276387691498, 0.3084399998188019, 1.497528672218322...
func DecodeUnsealRequest(_ context.Context, grpcReq interface{}) (interface{}, error) { req := grpcReq.(*pb.UnsealRequest) return &endpoints.UnsealRequest{Key: req.Key, Reset: req.Reset_}, nil }
[ -1.1226953268051147, -0.7186288237571716, 0.5427263975143433, -0.5893349647521973, -0.6021881103515625, -0.4786294102668762, 0.22770743072032928, 0.16935570538043976, 0.07649953663349152, 0.007010666187852621, -0.11387257277965546, 0.5487861037254333, -0.2525365948677063, -0.19730341434478...
func DecodeUnsealResponse(_ context.Context, grpcReply interface{}) (interface{}, error) { reply := grpcReply.(*pb.UnsealResponse) status := endpoints.UnsealResponse{ Sealed: reply.SealStatus.Sealed, T: int(reply.SealStatus.T), N: int(reply.SealStatus.N), Progress: int(reply.SealSt...
[ -0.49140679836273193, -1.3434473276138306, 0.4293380677700043, -1.3841320276260376, -0.22763215005397797, -0.39486345648765564, 0.3681056797504425, -0.2863631248474121, 0.9421569108963013, -0.14386600255966187, -0.9748610854148865, 0.36235105991363525, -1.2183966636657715, -0.6982114315032...
func EncodeUnsealResponse(_ context.Context, response interface{}) (interface{}, error) { resp := response.(endpoints.UnsealResponse) status := &pb.SealStatus{ Sealed: resp.Sealed, T: uint32(resp.T), N: uint32(resp.N), Progress: uint32(resp.Progress), Version: resp.Version, ...
[ -0.44870415329933167, -1.2286272048950195, 0.22329407930374146, -0.9404741525650024, -0.48807579278945923, -0.08411933481693268, 0.07768828421831131, -0.6047579050064087, 1.2425974607467651, 0.18316054344177246, -0.486272394657135, 0.22276932001113892, -1.0715980529785156, -0.1071356162428...
func EncodeUnsealRequest(_ context.Context, request interface{}) (interface{}, error) { req := request.(endpoints.UnsealRequest) return &pb.UnsealRequest{ Key: req.Key, Reset_: req.Reset, }, nil }
[ -1.076361060142517, -0.35132527351379395, 0.43090420961380005, -0.32211801409721375, -0.6027029752731323, -0.1033891811966896, -0.09874583035707474, -0.41802021861076355, 0.5606611967086792, 0.5002517104148865, 0.02584446594119072, 0.5650840997695923, -0.2764988839626312, 0.311539053916931...
func DecodeConfigureRequest(_ context.Context, grpcReq interface{}) (interface{}, error) { req := grpcReq.(*pb.ConfigureRequest) return &endpoints.ConfigureRequest{URL: req.Url, Token: req.Token}, nil }
[ -2.013400077819824, -0.1604996621608734, 0.611644983291626, 0.11475864052772522, -0.07095146924257278, -1.1493580341339111, -0.08110259473323822, 0.5424778461456299, -0.2440279871225357, 0.045404378324747086, -0.18335255980491638, -0.14745000004768372, -0.43718206882476807, 0.5959836840629...
func DecodeConfigureResponse(_ context.Context, grpcReply interface{}) (interface{}, error) { reply := grpcReply.(*pb.ConfigureResponse) var mounts map[string]endpoints.MountOutput var auths map[string]endpoints.AuthMountOutput var policies []string if reply.ConfigStatus != nil { // mounts if (reply.ConfigSt...
[ -0.5061151385307312, -0.6426499485969543, 0.6064496040344238, -0.4334351420402527, -0.061087846755981445, -0.6344614624977112, -0.45781245827674866, 0.2338106781244278, 0.5011542439460754, 0.6441463828086853, -0.8843911290168762, -0.45205584168434143, -0.24492476880550385, 0.25869557261466...
func EncodeConfigureResponse(_ context.Context, response interface{}) (interface{}, error) { resp := response.(endpoints.ConfigureResponse) // mounts var mounts map[string]*pb.MountOutput if (resp.Mounts != nil) && (len(resp.Mounts) > 0) { mounts = make(map[string]*pb.MountOutput) for k, v := range resp.Mounts...
[ -0.5240145921707153, -0.8900291323661804, 0.6335710287094116, -0.28688859939575195, -0.14047886431217194, -0.5442507863044739, -0.5506753921508789, -0.13989147543907166, 0.6755799651145935, 0.48376548290252686, -0.7573443651199341, -0.8497423529624939, -0.21996530890464783, 0.5664852857589...
func EncodeConfigureRequest(_ context.Context, request interface{}) (interface{}, error) { req := request.(endpoints.ConfigureRequest) return &pb.ConfigureRequest{ Url: req.URL, Token: req.Token, }, nil }
[ -2.0086915493011475, 0.18409328162670135, 0.4468322992324829, 0.5151920318603516, -0.16661573946475983, -0.5010983347892761, -0.5174828767776489, -0.20174112915992737, 0.20438428223133087, 0.3622116446495056, -0.0713057667016983, 0.1295420378446579, -0.5872794985771179, 1.0795484781265259,...
func join(s []jen.Code) *jen.Statement { r := jen.Empty() for i, stmt := range s { if i > 0 { r.Line() } r.Add(stmt) } return r }
[ 0.14887309074401855, -0.11163122951984406, 0.35289427638053894, -0.09804787486791611, -0.6260604858398438, -0.318595826625824, -0.8767703175544739, -0.121848925948143, 0.17342643439769745, 0.35590994358062744, 0.3276415765285492, -0.4467664659023285, -0.7004119753837585, 0.7403687834739685...
func (p *PropertyGenerator) packageName() string { return p.Package }
[ -0.9049403071403503, 0.12465715408325195, 0.4031412899494171, 0.3215240240097046, -0.5578877329826355, -0.155568465590477, 0.6045228242874146, 1.4177051782608032, -0.3553127944469452, -0.5556735992431641, 1.1819114685058594, -0.795311689376831, 0.5074676275253296, -0.2051510214805603, -0...
func (p *PropertyGenerator) StructName() string { if p.asIterator { return p.Name.CamelName } return fmt.Sprintf("%sProperty", p.Name.CamelName) }
[ -0.6579093933105469, -0.9260929226875305, 0.5722344517707825, -0.1911415457725525, -1.0047022104263306, 0.3564251959323883, 0.3936639726161957, 0.3156784772872925, 0.4947354793548584, 0.24948006868362427, 1.2073904275894165, -0.5988103747367859, -0.15246859192848206, -0.5620559453964233, ...
func (p *PropertyGenerator) PropertyName() string { return p.Name.LowerName }
[ -0.07758769392967224, -1.749365210533142, 0.34302473068237305, -0.11617016047239304, -0.5004900097846985, 0.5424155592918396, 0.1512480080127716, 0.4806283116340637, -0.24567410349845886, -0.49155521392822266, 1.140057921409607, 0.1453215777873993, -0.6507606506347656, -0.1377386450767517,...
func (p *PropertyGenerator) deserializeFnName() string { if p.asIterator { return fmt.Sprintf("%s%s", deserializeIteratorMethod, p.Name.CamelName) } return fmt.Sprintf("%s%sProperty", deserializeMethod, p.Name.CamelName) }
[ -0.7738015055656433, -0.4024318754673004, 0.6892910599708557, -1.021061658859253, -0.862744152545929, -1.0756560564041138, -0.19390177726745605, -0.12424761801958084, -0.004959422629326582, -0.9305499792098999, 0.014828459359705448, -0.5597969889640808, 0.294312059879303, -0.14801953732967...
func (p *PropertyGenerator) getFnName(i int) string { if len(p.Kinds) == 1 { return getMethod } return fmt.Sprintf("%s%s", getMethod, p.kindCamelName(i)) }
[ -1.2311079502105713, 0.36400681734085083, 0.8392650485038757, -0.1845933496952057, -0.33126384019851685, -1.4285924434661865, 0.032914578914642334, -0.9395120143890381, -0.1698007881641388, -0.667866051197052, 0.6708449721336365, -0.26089948415756226, 0.5978488326072693, 0.25716432929039, ...
func (p *PropertyGenerator) setFnName(i int) string { if len(p.Kinds) == 1 { return setMethod } return fmt.Sprintf("%s%s", setMethod, p.kindCamelName(i)) }
[ -1.330834984779358, 0.2136041671037674, 0.6267368197441101, -0.4244309365749359, -0.5989232063293457, -1.1239104270935059, 0.24559569358825684, -0.8336028456687927, -0.3076179027557373, -0.33279821276664734, 0.03916525840759277, -0.47868266701698303, 0.4818228483200073, 0.5038127899169922,...
func (p *PropertyGenerator) serializeFnName() string { if p.asIterator { return serializeIteratorMethod } return serializeMethod }
[ -0.7614458203315735, -0.21454733610153198, 0.5571994781494141, 0.21554669737815857, -0.9481576681137085, -1.2874349355697632, 0.6423232555389404, -0.5998699069023132, 0.5651968121528625, -0.872901201248169, -0.09984740614891052, -0.6594272255897522, -0.035758670419454575, 0.685449540615081...
func (p *PropertyGenerator) kindCamelName(i int) string { return p.Kinds[i].Name.CamelName }
[ -1.1157437562942505, -0.7349333763122559, 0.5453206896781921, -0.6849125027656555, -0.981705904006958, 0.29005590081214905, 0.2840958833694458, -0.9990996718406677, -0.45945876836776733, 0.4447866678237915, 0.7760744690895081, 0.057949911803007126, 0.22612519562244415, -0.13370411098003387...
func (p *PropertyGenerator) memberName(i int) string { return fmt.Sprintf("%sMember", p.Kinds[i].Name.LowerName) }
[ -0.6607888340950012, -0.8049889802932739, 0.5507333874702454, -0.8826490044593811, -0.44825199246406555, 0.3192371129989624, -0.3701232969760895, -0.20677827298641205, -0.9828220009803772, 0.5397343635559082, 0.724492073059082, 0.18512925505638123, -0.6030718088150024, -0.13298320770263672...
func (p *PropertyGenerator) hasMemberName(i int) string { if len(p.Kinds) == 1 && p.Kinds[0].Nilable { panic("PropertyGenerator.hasMemberName called for nilable single value") } return fmt.Sprintf("has%sMember", p.Kinds[i].Name.CamelName) }
[ -0.13789483904838562, -0.19106319546699524, 0.6507594585418701, -0.07132099568843842, -0.5602216720581055, -0.10248514264822006, -0.060902856290340424, 0.0756969228386879, -0.18475021421909332, 0.0892404317855835, 0.19160646200180054, -0.28547072410583496, -0.37769848108291626, 1.030977129...
func (p *PropertyGenerator) clearMethodName() string { if p.asIterator { return iteratorClearMethod } return clearMethod }
[ -0.5379759669303894, 0.03447709232568741, 0.6657627820968628, 0.7697906494140625, -1.6453990936279297, 0.09798388928174973, -0.3766050934791565, -0.6892513632774353, 0.24520914256572723, 1.3795920610427856, 1.3417044878005981, -0.3014748692512512, -0.22633840143680573, 0.11217028647661209,...
func (p *PropertyGenerator) commonMethods() []*codegen.Method { return []*codegen.Method{ codegen.NewCommentedValueMethod( p.packageName(), nameMethod, p.StructName(), /*params=*/ nil, []jen.Code{jen.String()}, []jen.Code{ jen.Return( jen.Lit(p.PropertyName()), ), }, jen.Commentf...
[ -0.3678872883319855, -0.30163639783859253, 0.7203174829483032, 0.3449481129646301, 0.05533826723694801, 0.3913716971874237, 0.7005800604820251, -0.5597449541091919, -0.32458361983299255, 0.429088830947876, 0.413928359746933, -0.24239477515220642, -0.8833610415458679, 0.43775495886802673, ...
func (p *PropertyGenerator) isMethodName(i int) string { return fmt.Sprintf("%s%s", isMethod, p.kindCamelName(i)) }
[ -1.0488762855529785, 0.4552278518676758, 0.6104651093482971, 0.0690033808350563, -0.26509007811546326, -0.3360527753829956, -0.5537009239196777, -0.31253665685653687, 0.9190305471420288, 0.8441989421844482, 0.3797995150089264, -0.4855830669403076, -0.2266468107700348, 0.10672962665557861, ...
func NewObserver() *Observer { return &Observer{ close: make(chan interface{}), events: make(chan Event), } }
[ 0.054217979311943054, -1.3046709299087524, 0.28144171833992004, -0.20186230540275574, -0.9968619346618652, -0.03422040119767189, 0.10599621385335922, 0.21677567064762115, 0.27028998732566833, -0.740536630153656, -0.21667993068695068, -0.1922668218612671, -0.9853890538215637, -0.01171059254...
func (o *Observer) AddTracepoint(name string) EventSource { source := atomic.AddUint32(&o.nextEventSource, 1) o.tracepoints = append(o.tracepoints, tracepointData{ source: EventSource(source), tp: newTracepoint(name), }) return EventSource(source) }
[ 0.423580527305603, 0.6210152506828308, 0.6706788539886475, -0.9926268458366394, -0.5775796175003052, 0.012567715719342232, -0.15932488441467285, -0.12086736410856247, 0.9086177349090576, 0.1662379801273346, -1.1613843441009521, -0.7649107575416565, -0.33021771907806396, -0.0740138441324234...
func (o *Observer) Open() error { var err error defer func() { if err != nil { o.Close() } }() for _, data := range o.tracepoints { tp := data.tp source := data.source if err = tp.open(); err != nil { return err } o.wg.Add(1) go func(tp *tracepoint, source EventSource) { // TODO(damien):...
[ -0.15149825811386108, 0.6045653223991394, 0.4282965660095215, -0.9092856049537659, -0.2754018008708954, 0.07079263031482697, 1.0910308361053467, 0.7469913959503174, -0.20925776660442352, 0.17750754952430725, 0.010636323131620884, -0.32691875100135803, 0.06412836164236069, 0.413104712963104...
func (o *Observer) ReadEvent() (Event, error) { select { case <-o.close: return nil, nil case event := <-o.events: return event, nil } }
[ 0.13146871328353882, 0.299998939037323, 0.7413523197174072, 0.1971435546875, -0.25441694259643555, -0.062171634286642075, 0.1017036959528923, -0.5513920187950134, 0.2518126964569092, -0.45186927914619446, 1.0149177312850952, 0.2895701229572296, -0.3279188573360443, -0.6716141104698181, 0...
func (o *Observer) Close() { close(o.close) for _, data := range o.tracepoints { data.tp.close() } o.wg.Wait() }
[ 0.5036323070526123, 0.27738603949546814, 0.3812513053417206, -0.5670117139816284, -0.29960334300994873, 1.0430234670639038, 0.9088743925094604, -0.39987611770629883, -0.8686435222625732, 0.0586673840880394, 0.2170223444700241, -0.9126288890838623, -0.10702837258577347, 0.8246269822120667, ...
func Handler(request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) { log.Printf("Processing Lambda request %s\n", request.RequestContext.RequestID) r := &UpdateRecipeRequest{} err := json.Unmarshal([]byte(request.Body), r) if err != nil { fmt.Printf("Could not parse body: %v.\n", reques...
[ -0.7781264185905457, 0.35205692052841187, 0.9274211525917053, -0.5683659911155701, -0.42290303111076355, 0.09548788517713547, -0.011874991469085217, 0.3684254288673401, 0.5611959099769592, -0.09309101104736328, -0.7254869937896729, 0.17404070496559143, 0.01651160418987274, -0.1226805299520...
func (bc *BitmarkdRPCClient) GetBitmarkFullProvenance(bitmarkID string) (json.RawMessage, error) { args := FullProvenanceArguments{Id: bitmarkID} var reply json.RawMessage err := bc.call("Bitmark.FullProvenance", &args, &reply) return reply, err }
[ -0.5614619255065918, 0.3227487802505493, 0.6637182235717773, 0.234983891248703, -0.4956882894039154, -1.089891791343689, 0.21658214926719666, -0.5329970121383667, 0.4543089270591736, 0.4651833772659302, -0.3242805600166321, 0.37206149101257324, -1.523268699645996, 0.32249516248703003, 0....
func NewServer() *Server { return &Server{ Config: Config{ Port: ":8080", }, } }
[ -0.6289814710617065, -0.6855664849281311, 0.1399603635072708, 0.08973205089569092, -0.6421096920967102, 0.4382532835006714, -0.35809963941574097, 0.2097480446100235, -0.36018794775009155, -0.1529848724603653, -0.577576756477356, 0.7732378840446472, -0.5076546669006348, 0.20324130356311798,...
func (g *Server) Serve() { addr := g.Config.Port fmt.Printf("======= Server start to listen (%s) and serve =======\n", addr) router := api.Router() if g.Config.GinMode != "" { gin.SetMode(g.Config.GinMode) } router.Run(addr) //router.Run("localhost:8081") //fmt.Println(router.ListenAndServe("addr", nil))...
[ -0.8412196636199951, -0.5915375351905823, 0.5954490303993225, 0.3453388512134552, 0.7644705176353455, 0.49287286400794983, 0.7174020409584045, 0.6860695481300354, -0.9390136003494263, -0.044614098966121674, -0.7105400562286377, 1.0680755376815796, -0.47459492087364197, 0.29428350925445557,...
func NewDataTierPhaseStatisticsBuilder() *DataTierPhaseStatisticsBuilder { r := DataTierPhaseStatisticsBuilder{ &DataTierPhaseStatistics{}, } return &r }
[ 0.590004563331604, 0.14859110116958618, 0.22736339271068573, 0.6143029928207397, -0.7907893657684326, 0.6407761573791504, 0.11864885687828064, 0.15184339880943298, 0.7405696511268616, -0.7655848860740662, 0.2046431005001068, -0.32253703474998474, 0.3070097267627716, 0.4850797951221466, 0...
func (rb *DataTierPhaseStatisticsBuilder) Build() DataTierPhaseStatistics { return *rb.v }
[ 0.6612262725830078, -0.5408458709716797, 0.05907795578241348, 0.17000527679920197, -0.3567762076854706, 0.2859889268875122, 0.27848830819129944, -0.4415433406829834, 0.6198652982711792, -0.7107118964195251, 0.8393459320068359, 0.20477288961410522, -0.13434353470802307, 0.3909887671470642, ...
func (t ManageCapinfoCache) OnNewSource(pcap.HandlerCode, gowid.IApp) { clearCapinfoState() }
[ 0.012817883864045143, -0.9253689050674438, -0.035161733627319336, 0.17423388361930847, -0.73236083984375, -0.18607842922210693, -0.5832072496414185, -0.09414981305599213, 1.1627044677734375, 0.23961396515369415, -0.9104161262512207, 0.08881713449954987, -0.23103921115398407, 0.723454773426...
func (s *Server) Setup() error { if s.Logger == nil { s.Logger = log.New(os.Stderr, "", log.LstdFlags) } s.Printf("Connecting to origin at %s...", s.OriginHost) origin, err := connect.Connect(s.OriginHost) if err != nil { s.Fatalf("Failed to connect to origin '%s': %v", s.OriginHost, err) } opts := map[str...
[ -0.8743069767951965, -0.1822155863046646, 0.8306860327720642, -0.5561708211898804, 0.4633590877056122, 0.2793765664100647, 0.5548866987228394, 0.3166505992412567, -0.03124420717358589, 0.14741240441799164, -0.37766435742378235, 0.8022931814193726, -0.3934252858161926, 0.2662133574485779, ...
func (s *Server) Start(stopCh <-chan struct{}) (err error) { s.Print("Starting server...") s.lis, err = net.Listen("tcp", s.ServerHost) if err != nil { return err } s.Printf("Listening on %s", s.ServerHost) for { select { case <-stopCh: break default: conn, err := s.lis.Accept() if err != nil { ...
[ -0.6223524212837219, -0.6258212924003601, 0.5526463389396667, -0.4019855260848999, 0.14028795063495636, 0.6242039799690247, 0.08198167383670807, 0.515302300453186, -0.4901972711086273, -0.27124646306037903, -0.9487355947494507, 0.4283783733844757, 0.028422653675079346, 0.6714993715286255, ...
func NewPlanner(db DB) *Planner { return &Planner{ DB: db, Now: time.Now, } }
[ -0.3319392502307892, -0.45863261818885803, 0.06580576300621033, 0.1597924381494522, -0.8468534350395203, 0.5896042585372925, -0.734611451625824, 0.44639384746551514, 0.17350533604621887, -0.39910468459129333, -0.5077981352806091, -0.26905399560928345, 0.05631877854466438, 1.557122707366943...
func (p *Planner) normalizeDimensions(dimensions Dimensions) (time.Duration, []string, error) { // Ignore if there are no dimensions. if len(dimensions) == 0 { return 0, nil, nil } // If the first dimension is a "time(duration)" then extract the duration. if call, ok := dimensions[0].Expr.(*Call); ok && strings...
[ -0.8574739694595337, 0.656900942325592, 0.6527124047279358, -0.17770597338676453, -0.07522736489772797, -0.7297925353050232, 0.4680614173412323, -0.16444317996501923, -0.137322798371315, 1.00034761428833, 0.003340030089020729, -0.15687872469425201, -0.11180399358272552, 1.242843747138977, ...
func (p *Planner) planField(e *Executor, f *Field) (processor, error) { return p.planExpr(e, f.Expr) }
[ -0.6900374889373779, 0.8506789803504944, 0.3551194965839386, -0.3569844961166382, -0.43716689944267273, 0.5396579504013062, 0.10990073531866074, 0.9488147497177124, -0.5497086048126221, 0.5080533027648926, -0.24499501287937164, -0.6459230780601501, -0.4745194613933563, -0.40700313448905945...
func (p *Planner) planExpr(e *Executor, expr Expr) (processor, error) { switch expr := expr.(type) { case *VarRef: panic("TODO") case *Call: return p.planCall(e, expr) case *BinaryExpr: return p.planBinaryExpr(e, expr) case *ParenExpr: return p.planExpr(e, expr.Expr) case *NumberLiteral: return newLiter...
[ 0.0221336018294096, 0.029305294156074524, 0.7875327467918396, -0.14114055037498474, -0.9023377895355225, 0.31317055225372314, -1.0368101596832275, 0.03317174315452576, -0.11587335914373398, 0.6297729015350342, 0.7245054841041565, 0.6154065728187561, -0.675066351890564, 0.25387242436408997,...
func (p *Planner) planCall(e *Executor, c *Call) (processor, error) { // Ensure there is a single argument. if len(c.Args) != 1 { return nil, fmt.Errorf("expected one argument for %s()", c.Name) } // Ensure the argument is a variable reference. ref, ok := c.Args[0].(*VarRef) if !ok { return nil, fmt.Errorf("...
[ -0.021342160180211067, 1.2419945001602173, 0.9309586882591248, -0.6504354476928711, -0.6270532011985779, -0.162940114736557, -0.08207568526268005, -0.27059391140937805, -0.1294773817062378, 0.439879447221756, -0.11250580847263336, 0.022893564775586128, 0.4002751410007477, 0.292186230421066...
func (p *Planner) planBinaryExpr(e *Executor, expr *BinaryExpr) (processor, error) { // Create processor for LHS. lhs, err := p.planExpr(e, expr.LHS) if err != nil { return nil, fmt.Errorf("lhs: %s", err) } // Create processor for RHS. rhs, err := p.planExpr(e, expr.RHS) if err != nil { return nil, fmt.Erro...
[ -0.14237956702709198, -0.12418073415756226, 0.7632452845573425, 0.04503049701452255, -0.14799584448337555, 0.4178737699985504, 0.08269474655389786, 0.47497081756591797, -0.2930530309677124, 0.550277590751648, -0.43350115418434143, 0.8788703083992004, -0.5702909827232361, 0.2092413157224655...
func (p *Planner) extractTags(name string, expr Expr, tags map[string]string) (Expr, error) { // TODO: Refactor into a walk-like Replace(). switch expr := expr.(type) { case *BinaryExpr: // If the LHS is a variable ref then check for tag equality. if lhs, ok := expr.LHS.(*VarRef); ok && expr.Op == EQ { return...
[ 0.5216860175132751, 0.4086112380027771, 0.7148720622062683, 0.4342362880706787, -0.5837974548339844, -0.7586939930915833, -0.486531525850296, -0.10026364773511887, -0.42653658986091614, 0.6161556839942932, -0.34278950095176697, 0.17507554590702057, -0.6969255208969116, 1.2290265560150146, ...
func (p *Planner) extractBinaryExprTags(name string, expr Expr, ref *VarRef, value Expr, tags map[string]string) (Expr, error) { // Ignore if the value is not a string literal. lit, ok := value.(*StringLiteral) if !ok { return expr, nil } // Extract the key and remove the measurement prefix. key := strings.Tri...
[ 0.5002638101577759, 0.02713358961045742, 0.6498112678527832, -0.06900163739919662, -0.36021822690963745, -1.284606695175171, -0.6088595986366272, -0.2356618046760559, -0.8499124050140381, 0.898833155632019, -0.49525201320648193, 0.4634576737880707, -0.6758056282997131, 0.6920457482337952, ...