text
stringlengths
11
6.3k
embedding
listlengths
768
768
func Dial(laddr, raddr *net.TCPAddr, ttl uint8, md5Secret string, noRoute bool) (*Conn, error) { if raddr == nil { return nil, fmt.Errorf("raddr is mandatory") } afi := uint16(syscall.AF_INET) if raddr.IP.To4() == nil { afi = syscall.AF_INET6 } c, err := dialTCP(afi, laddr, raddr, ttl, md5Secret, noRoute) ...
[ 0.5202473402023315, 0.0526222288608551, 0.6894921660423279, -0.696459949016571, -0.15524521470069885, 0.20269149541854858, -0.24214379489421844, 0.3764236867427826, 0.6069527864456177, 0.6105543971061707, 0.46699923276901245, 0.24928438663482666, 0.09090927988290787, 0.38032692670822144, ...
func (c *Conn) Write(b []byte) (n int, err error) { return syscall.Write(c.fd, b) }
[ -0.5481770634651184, 0.46627143025398254, 0.4080558121204376, 0.9619324803352356, 0.6175627112388611, -0.3861524760723114, 0.5818119049072266, 0.4592541456222534, -0.11720103770494461, -0.5503762364387512, -0.8223438858985901, -0.4794367253780365, -0.9422622919082642, 1.1384047269821167, ...
func (c *Conn) Read(b []byte) (n int, err error) { return syscall.Read(c.fd, b) }
[ 0.08112984895706177, 0.07953785359859467, 0.4922521114349365, 0.7107385396957397, -0.1664217710494995, -0.2087833732366562, 0.4024603068828583, 0.03591131418943405, -0.25213971734046936, -0.8503333926200867, -0.16803300380706787, 0.06171391159296036, -0.8892439007759094, 0.826170027256012,...
func (c *Conn) Close() error { return syscall.Close(c.fd) }
[ 1.0215622186660767, -0.1511557698249817, 0.47584712505340576, 0.4621763527393341, 0.072264164686203, -0.07041221857070923, -0.06341089308261871, 0.06060333177447319, -0.921937108039856, -1.851723074913025, 0.41784361004829407, -0.5168097615242004, -0.0975738987326622, 1.0633609294891357, ...
func (c *Conn) LocalAddr() net.Addr { return c.laddr }
[ 1.1164354085922241, -1.1547960042953491, 0.3412664830684662, -0.8042670488357544, -0.9883086681365967, 0.41591835021972656, -0.8687286376953125, 0.8358135223388672, 0.23435191810131073, -0.6606868505477905, 0.8671387434005737, 0.10679185390472412, -0.5527414083480835, 0.14484378695487976, ...
func (c *Conn) RemoteAddr() net.Addr { return c.raddr }
[ 0.8650907874107361, -1.4083712100982666, 0.6109639406204224, -0.7400814890861511, -1.0214258432388306, 1.1012943983078003, -0.5918325185775757, 0.32484838366508484, 0.6815910935401917, -0.5455676913261414, 0.15256866812705994, 0.8607290387153625, -0.8278720378875732, 0.12242761254310608, ...
func (c *Conn) SetDeadline(t time.Time) error { return fmt.Errorf("No supported") }
[ -0.672646164894104, -0.14614349603652954, 0.7456783056259155, 0.8169298768043518, 0.6897119879722595, 0.5127383470535278, -1.003996729850769, -0.08078876882791519, -0.6992208361625671, 0.2314029484987259, -1.0292253494262695, 0.042522650212049484, -0.10199989378452301, 0.8186938166618347, ...
func (c *Conn) SetReadDeadline(t time.Time) error { return fmt.Errorf("No supported") }
[ -0.8974194526672363, -0.42626360058784485, 0.7827590107917786, 0.006367623805999756, -0.08423804491758347, 0.7448530793190002, -0.4551604092121124, -0.663470983505249, -0.3644137680530548, 0.2451876550912857, -1.0050852298736572, 0.18479454517364502, 0.47868773341178894, 0.7558522820472717...
func (c *Conn) SetWriteDeadline(t time.Time) error { return fmt.Errorf("No supported") }
[ -1.30156672000885, -0.7444770336151123, 0.7294632196426392, 0.13191744685173035, 1.1558624505996704, 0.5718677043914795, -0.34711918234825134, 0.0941632017493248, -0.5412822961807251, 0.11076755821704865, -0.7438631653785706, -0.1955799013376236, -0.1875927597284317, 0.33406341075897217, ...
func (c *Conn) SetTTL(ttl uint8) error { if c.raddr.IP.To4() != nil { return syscall.SetsockoptInt(c.fd, syscall.SOL_IP, syscall.IP_TTL, int(ttl)) } return syscall.SetsockoptInt(c.fd, syscall.IPPROTO_IPV6, syscall.IPV6_UNICAST_HOPS, int(ttl)) }
[ 0.04380710795521736, 0.29487156867980957, 0.5122290849685669, 0.2039605677127838, 0.10745521634817123, -0.5626457929611206, 0.8755542039871216, 0.16927659511566162, 1.249950885772705, 0.46159857511520386, -0.3735086917877197, -1.025590419769287, 0.09791562706232071, -0.5459359884262085, ...
func (c *Conn) SetDontRoute() error { return syscall.SetsockoptInt(c.fd, syscall.SOL_SOCKET, syscall.SO_DONTROUTE, 1) }
[ -0.06816016882658005, 0.3861787021160126, 0.45698460936546326, -0.7627880573272705, 1.0306726694107056, 0.2546022832393646, 1.3657563924789429, -0.9542090892791748, -0.6171967387199402, 0.12153661996126175, -0.1608775556087494, 0.04096980392932892, -0.9807634353637695, 0.45737552642822266,...
func (c *Conn) SetNoDelay() error { return syscall.SetsockoptInt(c.fd, syscall.IPPROTO_TCP, syscall.TCP_NODELAY, 1) }
[ 0.28985270857810974, 0.4604264795780182, 0.3788975477218628, -0.8083729147911072, -0.22033736109733582, 0.029098080471158028, 0.41404882073402405, -0.5769321322441101, -0.2710019648075104, -0.7312770485877991, -0.26415693759918213, 0.6031911373138428, -0.5552476644515991, 0.965420722961425...
func Dial(conf Config) (*Database, error) { db := Database{ config: conf, } // Setup cluster hosts if len(db.config.Hosts) < 1 { return nil, fmt.Errorf("must provide at least one Cassandra host to connect to") } // For Cassandra, only one host needs to be specified, the client will identify peers from the cl...
[ 0.2602015435695648, 0.22077298164367676, 0.6431535482406616, -0.3618488609790802, 0.3201437294483185, 0.35661062598228455, -0.19861410558223724, 0.3554575741291046, 0.32255011796951294, 0.733582615852356, 0.024043388664722443, 0.06002788245677948, -0.3664277493953705, -0.11597240716218948,...
func (db *Database) Setup() error { if db == nil || db.conn == nil { return hord.ErrNoDial } ksMeta, err := db.conn.KeyspaceMetadata(db.config.Keyspace) // If keyspace exists and there was an error dip out with an err if err != nil && err != gocql.ErrNoKeyspace { return fmt.Errorf("unable to initialize databa...
[ 0.20883797109127045, 0.2557428777217865, 0.8425307869911194, -0.08464356511831284, 0.285989910364151, 0.08890886604785919, -0.38407644629478455, -0.01797378435730934, 0.42210012674331665, 0.41830646991729736, -0.1425481140613556, -0.03280666097998619, -0.6769508123397827, 1.236664295196533...
func (db *Database) Get(key string) ([]byte, error) { var data []byte if db == nil || db.conn == nil { return data, hord.ErrNoDial } if err := hord.ValidKey(key); err != nil { return data, err } err := db.conn.Query(`SELECT data FROM hord WHERE key = ?;`, key).Scan(&data) if err != nil && err != gocql.Err...
[ -0.7733646631240845, 0.6474291682243347, 0.7560807466506958, 0.05753481015563011, 0.05044683441519737, 0.08482137322425842, -1.2843085527420044, 0.1336112916469574, -0.4687615931034088, 0.001558217452839017, 0.0281718410551548, 0.2412731796503067, -0.9855371117591858, 0.6625088453292847, ...
func (db *Database) Set(key string, data []byte) error { if db == nil || db.conn == nil { return hord.ErrNoDial } if err := hord.ValidKey(key); err != nil { return err } if err := hord.ValidData(data); err != nil { return err } err := db.conn.Query(`UPDATE hord SET data = ? WHERE key = ?`, data, key).Ex...
[ -0.8138088583946228, 0.07476256787776947, 0.33379092812538147, -0.24285292625427246, -0.4532484710216522, 0.5406596660614014, -1.2412645816802979, 0.2736082077026367, -0.5160337090492249, 0.3317129909992218, -0.5569361448287964, 0.07627721130847931, -0.8406916260719299, 0.5810685157775879,...
func (db *Database) Delete(key string) error { if db == nil || db.conn == nil { return hord.ErrNoDial } if err := hord.ValidKey(key); err != nil { return err } err := db.conn.Query(`DELETE FROM hord WHERE key = ?;`, key).Exec() if err != nil { return err } return nil }
[ -0.038348037749528885, 1.0258671045303345, 0.5674537420272827, 0.352671355009079, 0.10102198272943497, 0.4158230423927307, -0.6572691202163696, 0.5095669627189636, 0.17733672261238098, 0.5833852291107178, 0.1260208934545517, -0.731187641620636, -1.4924237728118896, 0.6569517850875854, 0....
func (db *Database) Keys() ([]string, error) { var keys []string var key string if db == nil || db.conn == nil { return keys, hord.ErrNoDial } l := db.conn.Query("SELECT key from hord;").Iter() for l.Scan(&key) { keys = append(keys, key) } err := l.Close() if err != nil { return keys, err } return ...
[ -0.8331764340400696, 0.48478367924690247, 0.31359052658081055, 0.2239055037498474, 0.48325932025909424, 0.09169811755418777, -1.5215837955474854, 0.08342555165290833, -0.06190112605690956, 0.2714554965496063, 0.3220847249031067, -0.15235596895217896, -0.7605365514755249, 0.8220013380050659...
func (db *Database) HealthCheck() error { if db == nil || db.conn == nil { return hord.ErrNoDial } err := db.conn.Query("SELECT now() FROM system.local;").Exec() if err != nil { return fmt.Errorf("health check of Cassandra cluster failed") } return nil }
[ 0.4459477365016937, 0.5020617842674255, 0.660118818283081, 0.1580885648727417, 1.1195213794708252, 0.5835410356521606, 0.17003408074378967, 0.4383845329284668, -0.6911138296127319, 0.11562013626098633, 0.8184784650802612, 0.1730867326259613, 0.4495941996574402, 0.38238614797592163, 0.695...
func (db *Database) Close() { if db != nil { db.conn.Close() } }
[ 0.25302213430404663, 0.8456799387931824, 0.16898483037948608, 0.5863763093948364, 0.4759998619556427, 0.22362098097801208, -0.34417855739593506, 0.2982408404350281, -0.36999472975730896, -0.6800962090492249, 0.5126420855522156, -0.03024245798587799, -1.4536265134811401, 1.9326977729797363,...
func controllerSubtest(name string, tc *sessionTestCase) func(t *testing.T) { return func(t *testing.T) { t.Parallel() // This test uses the same controller to manage two sessions that are communicating with // each other (basically, both the "local" and "remote" session are on the same system). // This is po...
[ 0.7956128716468811, -0.567634642124176, 0.8915100693702698, -0.2296624481678009, 0.4017983376979828, 0.1111215278506279, 1.1608681678771973, -0.20329509675502777, 1.2541944980621338, -0.32370468974113464, -0.38678041100502014, 0.2891958951950073, 0.1014975979924202, 0.23347438871860504, ...
func (m ManagedConsumerConfig) setDefaults() ManagedConsumerConfig { if m.NewConsumerTimeout <= 0 { m.NewConsumerTimeout = 5 * time.Second } if m.InitialReconnectDelay <= 0 { m.InitialReconnectDelay = 1 * time.Second } if m.MaxReconnectDelay <= 0 { m.MaxReconnectDelay = 5 * time.Minute } // unbuffered queu...
[ 0.16534832119941711, 0.2810888886451721, 0.462171345949173, -0.12137727439403534, 0.0640883669257164, -0.34782761335372925, -0.14952655136585236, -0.5589216947555542, -0.6007828116416931, -0.04052933678030968, -0.18865056335926056, 0.2468305379152298, -1.3632888793945312, 1.000362157821655...
func NewManagedConsumer(cp *ManagedClientPool, cfg ManagedConsumerConfig) *ManagedConsumer { cfg = cfg.setDefaults() m := ManagedConsumer{ clientPool: cp, cfg: cfg, asyncErrs: asyncErrors(cfg.Errs), queue: make(chan Message, cfg.QueueSize), waitc: make(chan struct{}), } go m.manage() ...
[ 0.2958070635795593, -0.07938187569379807, 0.5897120237350464, -0.1331210434436798, -0.3544345200061798, -0.4205828607082367, -0.4835972487926483, -0.9173654913902283, -0.49664798378944397, 0.3964409828186035, -0.03712726756930351, 0.7290165424346924, -0.5964265465736389, 1.3771668672561646...
func (m *ManagedConsumer) Ack(ctx context.Context, msg Message) error { for { m.mu.RLock() consumer := m.consumer wait := m.waitc m.mu.RUnlock() if consumer == nil { select { case <-wait: // a new consumer was established. // Re-enter read-lock to obtain it. continue case <-ctx.Done(): ...
[ 0.31166091561317444, -0.11798611283302307, 0.6684503555297852, 0.4211901128292084, 0.23031401634216309, -0.46705421805381775, 0.9545442461967468, -0.3168148398399353, -0.7386351227760315, 0.36956557631492615, 1.7950092554092407, 1.024893879890442, -0.21602772176265717, 0.10780708491802216,...
func (m *ManagedConsumer) Receive(ctx context.Context) (Message, error) { for { m.mu.RLock() consumer := m.consumer wait := m.waitc m.mu.RUnlock() if consumer == nil { select { case <-wait: // a new consumer was established. // Re-enter read-lock to obtain it. continue case <-ctx.Done()...
[ 0.09534220397472382, -0.6663402318954468, 0.784129798412323, 0.44183728098869324, 0.1051081046462059, -0.8393140435218811, -0.36063429713249207, -0.9417144656181335, -0.024434706196188927, -0.1277957558631897, 1.1438897848129272, 0.5348151922225952, -0.5505017042160034, 0.5532074570655823,...
func (m *ManagedConsumer) ReceiveAsync(ctx context.Context, msgs chan<- Message) error { // send flow request after 1/2 of the queue // has been consumed highwater := uint32(cap(m.queue)) / 2 drain := func() { for { select { case msg := <-m.queue: msgs <- msg default: return } } } CONSUME...
[ 0.03180635720491409, -0.9038519859313965, 1.0379726886749268, 0.23277384042739868, 0.3643431067466736, -1.1744458675384521, 0.15536409616470337, -0.6531845927238464, 0.21725206077098846, 0.09860488772392273, 0.5580112934112549, 0.4516347050666809, -0.2207777202129364, 0.8700478672981262, ...
func (m *ManagedConsumer) set(c *Consumer) { m.mu.Lock() m.consumer = c if m.waitc != nil { close(m.waitc) m.waitc = nil } m.mu.Unlock() }
[ 0.5113010406494141, -0.14318197965621948, 0.37413841485977173, -0.05225662887096405, -0.15367616713047028, 0.17816349864006042, 0.17310382425785065, -0.5292702913284302, -1.1876872777938843, 0.6001046299934387, -0.0003997635212726891, 0.6677994132041931, -1.0149991512298584, 0.508736133575...
func (m *ManagedConsumer) unset() { m.mu.Lock() if m.waitc == nil { // allow unset() to be called // multiple times by only creating // wait chan if its nil m.waitc = make(chan struct{}) } m.consumer = nil m.mu.Unlock() }
[ 0.1559135764837265, 0.43242892622947693, 0.5517663359642029, -0.4886767268180847, 0.12889939546585083, -0.9293267726898193, 0.6489917635917664, -0.13702914118766785, -1.0795018672943115, 0.043163154274225235, 1.2452871799468994, 0.9133893251419067, -0.7415454983711243, 0.4893985986709595, ...
func (m *ManagedConsumer) newConsumer(ctx context.Context) (*Consumer, error) { mc, err := m.clientPool.ForTopic(ctx, m.cfg.ManagedClientConfig, m.cfg.Topic) if err != nil { return nil, err } client, err := mc.Get(ctx) if err != nil { return nil, err } // Create the topic consumer. A non-blank consumer nam...
[ 0.2906866669654846, -0.0331096276640892, 0.3438856601715088, 0.4369545876979828, 0.02671647071838379, -0.16664917767047882, -0.06651926040649414, -0.5673035979270935, -0.606370210647583, 0.19733428955078125, 0.4749240279197693, 0.6888929009437561, -0.8194014430046082, 0.5443458557128906, ...
func (m *ManagedConsumer) reconnect(initial bool) *Consumer { retryDelay := m.cfg.InitialReconnectDelay for attempt := 1; ; attempt++ { if initial { initial = false } else { <-time.After(retryDelay) if retryDelay < m.cfg.MaxReconnectDelay { // double retry delay until we reach the max if retryDe...
[ 0.27931520342826843, -0.3822347819805145, 0.6157662868499756, 0.6339202523231506, -0.43705588579177856, -0.7191051244735718, -0.6299267411231995, 0.4823188781738281, -0.8604021668434143, 0.5306720733642578, 0.6821160912513733, 1.1092761754989624, -1.1033449172973633, -0.07181189209222794, ...
func (m *ManagedConsumer) manage() { defer m.unset() consumer := m.reconnect(true) m.set(consumer) for { select { case <-consumer.ReachedEndOfTopic(): // TODO: What to do here? For now, reconnect // reconnect case <-consumer.Closed(): // reconnect case <-consumer.ConnClosed(): // reconnect ...
[ 0.16024045646190643, -0.8908796310424805, 0.5710394978523254, 0.5143533945083618, 0.9639569520950317, -0.6132456064224243, -0.8058183193206787, -1.0021523237228394, 0.3119538724422455, 0.237722709774971, 0.5963851809501648, 0.2299225628376007, -1.1404093503952026, 0.1392219066619873, 0.0...
func (m *ManagedConsumer) RedeliverUnacknowledged(ctx context.Context) error { for { m.mu.RLock() consumer := m.consumer wait := m.waitc m.mu.RUnlock() if consumer == nil { select { case <-wait: // a new consumer was established. // Re-enter read-lock to obtain it. continue case <-ctx.D...
[ -0.024974966421723366, -0.39075595140457153, 0.7787975668907166, -0.3600703477859497, 0.03162144497036934, 0.04187287762761116, -0.4519657790660858, 0.3608074486255646, 0.10883061587810516, -0.3300233483314514, 0.37247127294540405, 0.6167604327201843, -0.4568939208984375, 1.554520606994629...
func (m *ManagedConsumer) RedeliverOverflow(ctx context.Context) (int, error) { for { m.mu.RLock() consumer := m.consumer wait := m.waitc m.mu.RUnlock() if consumer == nil { select { case <-wait: // a new consumer was established. // Re-enter read-lock to obtain it. continue case <-ctx....
[ 0.15039795637130737, 0.34444040060043335, 0.8651888370513916, 0.2626809775829315, -0.5249029994010925, -0.6642841696739197, 0.17755834758281708, -0.22169145941734314, 0.15532086789608002, -0.33562907576560974, 0.7332523465156555, 0.18382743000984192, -1.0196045637130737, 1.1385700702667236...
func (m *ManagedConsumer) Unsubscribe(ctx context.Context) error { for { m.mu.RLock() consumer := m.consumer wait := m.waitc m.mu.RUnlock() if consumer == nil { select { case <-wait: // a new consumer was established. // Re-enter read-lock to obtain it. continue case <-ctx.Done(): r...
[ 0.617951512336731, 0.03603469207882881, 0.6913332343101501, 0.5996452569961548, 0.002456320682540536, -1.0159575939178467, -0.10290639847517014, -0.3697037696838379, -1.127926230430603, -0.1479315459728241, 1.4899481534957886, 0.11528225243091583, -0.9303945899009705, 0.12437689304351807, ...
func (m *ManagedConsumer) Monitor() func() { m.mu.Lock() return m.mu.Unlock }
[ -0.2567301094532013, -0.3453999161720276, 0.44502484798431396, 0.6200029850006104, -0.08041633665561676, -1.346004843711853, -0.030998066067695618, -0.23144230246543884, 0.5545163154602051, -0.695419192314148, 0.23636272549629211, -0.2710283100605011, -1.0908509492874146, -0.26243224740028...
func Command() *cobra.Command { pluginsCmd := &cobra.Command{ Use: "plugins", Short: "Commands related to Kafka Connect plugins", Long: "", RunE: func(cmd *cobra.Command, _ []string) error { return cmd.Help() }, } // Add subcommands pluginsCmd.AddCommand(listPluginsCmd()) pluginsCmd.AddCommand(val...
[ 0.30521851778030396, -0.9581633806228638, 0.6677863001823425, 0.15851911902427673, 0.6280025839805603, 0.23620258271694183, -0.17767971754074097, 0.001191524788737297, 0.8235804438591003, 0.0055922893807291985, 0.2307496964931488, 0.591924786567688, -0.2780717611312866, -0.1241730675101280...
func (d *mockDatabase) Open() { d.t.Fail() }
[ -1.2452760934829712, 1.3268985748291016, 0.22829949855804443, -0.19703535735607147, -0.27256840467453003, 1.1738245487213135, 0.7934684157371521, 1.6309162378311157, -0.32445043325424194, 0.08733291923999786, -0.1879558563232422, -0.09137015044689178, -0.7478480935096741, 0.345881283283233...
func (r *ListTemplatesRequest) TypeUser() *ListTemplatesRequest { r.request.Add("type", "user") return r }
[ -0.9281895160675049, 0.7100943326950073, 0.450610876083374, 0.7780115604400635, -0.051441267132759094, 0.016569819301366806, 0.8091885447502136, -0.76727694272995, 1.2245808839797974, -0.7317577004432678, -1.0882551670074463, 0.3931180238723755, -0.8853524923324585, 0.2710195481777191, 0...
func (r *ListTemplatesRequest) TypeSystem() *ListTemplatesRequest { r.request.Add("type", "system") return r }
[ -1.3162707090377808, 0.8991950154304504, 0.25629138946533203, 0.007652904372662306, 1.0723013877868652, -0.12816603481769562, 0.2538951635360718, -1.5325111150741577, 1.3139350414276123, -0.21067336201667786, -0.35782569646835327, 0.922423779964447, -0.9800102114677429, 0.9938973188400269,...
func (r *ListTemplatesRequest) From(from time.Time) *ListTemplatesRequest { r.request.Add("date_from", from.UTC().Format("2006-01-02 15:04:05")) return r }
[ -0.1603408008813858, 0.0008040601387619972, 0.5618432760238647, 0.47930532693862915, -0.24599581956863403, 0.1502455174922943, -0.7669487595558167, -0.2858067452907562, 1.0577309131622314, -0.2855426073074341, -0.5875257849693298, 0.2936238646507263, 0.8720344305038452, 0.3553840219974518,...
func (r *ListTemplatesRequest) To(to time.Time) *ListTemplatesRequest { r.request.Add("date_to", to.UTC().Format("2006-01-02 15:04:05")) return r }
[ -0.8880569934844971, 0.5376540422439575, 0.6632943749427795, -0.7425830364227295, 0.5318598747253418, -0.30814170837402344, -0.6674553751945496, -0.37364429235458374, 0.6219298839569092, -0.09357947111129761, -0.9028733968734741, 0.9365968704223633, 0.5595775842666626, 0.21228601038455963,...
func (r *ListTemplatesRequest) Limit(limit int) *ListTemplatesRequest { r.request.Add("limit", strconv.Itoa(limit)) return r }
[ -0.813082754611969, 0.4582933485507965, 0.5007091760635376, 0.004861603025346994, -0.2393486201763153, -0.1370714157819748, 0.07961400598287582, 0.05249635502696037, 1.7729781866073608, -0.454022079706192, -0.3320583403110504, 0.07393205910921097, -0.9251546263694763, -0.12666329741477966,...
func (r *ListTemplatesRequest) Offset(offset int) *ListTemplatesRequest { r.request.Add("offset", strconv.Itoa(offset)) return r }
[ -0.8245449066162109, 0.06098560616374016, 0.39195773005485535, -0.4235652983188629, -0.8020618557929993, 0.7098661661148071, 0.347834050655365, 0.4072597622871399, 1.4226882457733154, -0.3378208577632904, -0.45916348695755005, 0.18284307420253754, -0.24557040631771088, 0.473938912153244, ...
func (r *ListTemplatesRequest) Execute() (res []ListTemplatesResult, err error) { err = r.request.Execute("listTemplates", &res) return }
[ -1.2788642644882202, 0.07184644043445587, 0.6152103543281555, 0.549339234828949, 0.5474644303321838, -0.9748581647872925, -0.6293898820877075, -0.7303106784820557, 1.430427074432373, 0.746656596660614, -0.8148588538169861, -0.3085660934448242, -0.7569185495376587, -0.16997522115707397, -...
func ListTemplates(request *api.Request) *ListTemplatesRequest { return &ListTemplatesRequest{ request: request, } }
[ -0.5675902962684631, -0.11986454576253891, 0.329744815826416, -0.031954824924468994, -0.45635536313056946, -1.3199354410171509, -0.827698826789856, -0.3718670904636383, 1.2163234949111938, -0.5311478972434998, -0.6911924481391907, 0.5927756428718567, -0.26703864336013794, 0.243967399001121...
func EnrollUser(username string, password string) (bool, error) { sdk := fabsdk.FabricSDK{} mspClient, err := msp.New(sdk.Context(), msp.WithOrg("Org1")) if err != nil { fmt.Printf("Failed to create msp client: %s\n", err) return true, err } _, err = mspClient.GetSigningIdentity(username) if err == msp.ErrUs...
[ -0.1911010593175888, 0.6048193573951721, 0.9878864288330078, 0.11988481879234314, -0.8564571738243103, 1.4772733449935913, 0.5064345002174377, 0.11037580668926239, 0.3248336911201477, 0.06176810711622238, -0.7469745874404907, 0.5616899132728577, -0.2463756799697876, 0.22120808064937592, ...
func RegisterlUser(username, password, department string) error { sdk := fabsdk.FabricSDK{} mspClient, err := msp.New(sdk.Context(), msp.WithOrg("Org1")) if err != nil { fmt.Printf("Failed to create msp client: %s\n", err) } request := &msp.RegistrationRequest{ Name: username, Type: "user", A...
[ 0.12939968705177307, 0.6309868097305298, 0.6500519514083862, 0.28757399320602417, -0.20651349425315857, 0.9337478280067444, -0.830542266368866, 0.8373854160308838, 0.36682307720184326, -0.1586683839559555, -1.3172228336334229, 1.164912462234497, -0.10428427159786224, 0.8479085564613342, ...
func (k *KubeAPI) RegisterKubeCache(c *caddy.Controller) { c.OnStartup(func() error { err := k.getAPIWatchers(c) if err != nil { return err } go k.APIConn.Run() timeout := time.After(5 * time.Second) ticker := time.NewTicker(100 * time.Millisecond) for { select { case <-ticker.C: if k.API...
[ -0.3342282176017761, 0.4095309376716614, 0.7314705848693848, 0.8862926959991455, 0.5833179354667664, -0.6513391733169556, -0.6162711977958679, -0.7970722913742065, -0.7587175369262695, 0.8493515253067017, -0.8766223192214966, 0.29427459836006165, -0.9863497614860535, 0.5226299166679382, ...
func parseStanza(c *caddy.Controller) (*KubeAPI, error) { kapi := New([]string{""}) for c.NextBlock() { switch c.Val() { case "endpoint": args := c.RemainingArgs() if len(args) == 1 { kapi.APIServer = args[0] continue } return nil, c.ArgErr() case "tls": // cert key cacertfile args := c.R...
[ -0.09794504195451736, -0.8887366056442261, 0.7499471306800842, 0.6166222095489502, -0.41277334094047546, -0.35871100425720215, 0.10785597562789917, -1.0109944343566895, -0.7283079624176025, -0.11978920549154282, -0.044540852308273315, 0.0027317579369992018, -0.5830467343330383, 0.824699163...
func Launch(pathToPluginExecutable string, timeout time.Duration) (*TerraformProvider, error) { m := discovery.PluginMeta{ Path: pathToPluginExecutable, } p, err := providerFactory(m, hclog.Error)() if err != nil { return nil, err } return &TerraformProvider{p, timeout}, nil }
[ 0.40648606419563293, -0.40221524238586426, 0.2107991725206375, 0.30459707975387573, -0.3821808695793152, 0.017599979415535927, 0.009990215301513672, 0.2799009084701538, 0.06924998015165329, 0.3683299422264099, 0.14862801134586334, 0.717572033405304, -0.011845975182950497, -0.52042424678802...
func providerFactory(meta discovery.PluginMeta, loglevel hclog.Level) providers.Factory { return func() (providers.Interface, error) { client := goPlugin.NewClient(clientConfig(meta, loglevel)) // Request the RPC client so we can get the provider // so we can build the actual RPC-implemented provider. rpcClien...
[ 0.35291194915771484, -0.056200798600912094, 0.3022076487541199, -0.32565152645111084, 0.3179294466972351, -0.23820964992046356, 0.5779778957366943, 0.06738610565662384, 0.05860471352934837, 0.15584664046764374, -0.3503587543964386, 0.18027733266353607, -0.6161283850669861, -0.5438568592071...
func clientConfig(m discovery.PluginMeta, loglevel hclog.Level) *goPlugin.ClientConfig { logger := hclog.New(&hclog.LoggerOptions{ Name: "plugin", Level: loglevel, Output: os.Stderr, }) return &goPlugin.ClientConfig{ Cmd: exec.Command(m.Path), //nolint:gosec HandshakeConfig: plugin.Handsh...
[ 0.7712916731834412, -0.3924773931503296, 0.3767448365688324, -0.36469021439552307, -0.02741549350321293, -0.610632061958313, 0.9216897487640381, 0.21036361157894135, -0.45390886068344116, 0.3780578076839447, -0.5319141149520874, 0.9812991619110107, -0.20334196090698242, 0.06724561750888824...
func (p TerraformProvider) Configure(config cty.Value) error { respConf := p.provider.Configure(providers.ConfigureRequest{ Config: config, }) return respConf.Diagnostics.Err() }
[ -0.8815861940383911, 0.7399839758872986, 0.278631329536438, 0.7123854756355286, 0.3040473759174347, -0.15136432647705078, 0.43333861231803894, -0.062355585396289825, -0.19970224797725677, 0.6120191812515259, -0.19370286166667938, -0.7409508228302002, 0.10950791835784912, 0.4782513678073883...
func (p TerraformProvider) GetSchemaForResource(terraformType string) (providers.Schema, error) { schemas := p.provider.GetSchema() resourceSchema, ok := schemas.ResourceTypes[terraformType] if !ok { return providers.Schema{}, fmt.Errorf("failed to get schema for resource") } return resourceSchema, nil }
[ -0.5490014553070068, 0.14212942123413086, 0.25557512044906616, -0.03951380029320717, 0.47989290952682495, 0.16303718090057373, -0.194035604596138, -0.3007318377494812, -0.1430705040693283, -0.10845891386270523, 0.6236817240715027, -0.4423683285713196, 0.757250964641571, 0.4968242347240448,...
func (p TerraformProvider) ImportResource(terraformType string, id string) ([]providers.ImportedResource, error) { var response providers.ImportResourceStateResponse err := resource.Retry(30*time.Second, func() *resource.RetryError { response = p.ImportResourceState(providers.ImportResourceStateRequest{ TypeNam...
[ -0.27187690138816833, 0.15696099400520325, 0.3819093108177185, 0.632185697555542, 0.36675646901130676, -0.10219039022922516, -0.25928589701652527, -0.33324378728866577, 0.7397691607475281, 1.699965238571167, -0.4138029217720032, -0.16355590522289276, -0.8155813217163086, -0.010582271032035...
func (p TerraformProvider) ReadResource(terraformType string, state cty.Value) (cty.Value, error) { var response providers.ReadResourceResponse err := resource.Retry(30*time.Second, func() *resource.RetryError { response = p.provider.ReadResource(providers.ReadResourceRequest{ TypeName: terraformType, Prio...
[ -0.3574618995189667, -0.2319507896900177, 0.4149108827114105, 0.21802477538585663, -0.3902938961982727, -0.12212280929088593, -0.2680993974208832, -0.4484511911869049, 0.38399195671081543, 0.7080619931221008, 1.1056931018829346, -0.023399364203214645, -0.6607000231742859, -0.51825195550918...
func (p TerraformProvider) DestroyResource(terraformType string, currentState cty.Value) error { var response providers.ApplyResourceChangeResponse err := resource.Retry(p.timeout, func() *resource.RetryError { response = p.ApplyResourceChange(providers.ApplyResourceChangeRequest{ TypeName: terraformType, ...
[ -0.614748477935791, 0.07484277337789536, 0.33782151341438293, 0.29903367161750793, 0.30839502811431885, -0.09905688464641571, -0.23707816004753113, 0.06382662057876587, 0.06655553728342056, 0.908294677734375, 0.6305418610572815, -0.24178816378116608, -0.44246307015419006, 0.660029649734497...
func enableForceDestroyAttributes(state cty.Value) cty.Value { stateWithDestroyAttrs := map[string]cty.Value{} if state.CanIterateElements() { for k, v := range state.AsValueMap() { if k == "force_detach_policies" || k == "force_destroy" { if v.Type().Equals(cty.Bool) { stateWithDestroyAttrs[k] = cty.T...
[ -0.7215378284454346, -0.20702329277992249, 0.5932404398918152, -0.4777466058731079, -0.04210546612739563, 0.042612724006175995, -0.3302482068538666, 0.36727195978164673, 0.3262508809566498, 0.6152628064155579, 0.05484224483370781, -0.32969167828559875, 0.5590327978134155, 0.177921980619430...
func Install(providerName, versionConstraint, installDir string, cacheBinary bool) (discovery.PluginMeta, error) { expandedInstallDir, err := goHomeDir.Expand(installDir) if err != nil { return discovery.PluginMeta{}, err } providerInstaller := &discovery.ProviderInstaller{ Dir: filepath.FromSlash(expandedInst...
[ -0.25739678740501404, -0.17867529392242432, 0.633831262588501, 0.4663028120994568, -0.0911262184381485, -0.5688474178314209, 0.35243499279022217, 0.4671017825603485, -0.29181626439094543, 1.2935445308685303, -0.48550090193748474, 0.548152506351471, -0.3223349153995514, -0.01353532541543245...
func Init(providerName string, installDir string, timeout time.Duration) (*TerraformProvider, error) { pConfig, pVersion, err := config(providerName) if err != nil { log.WithField("name", providerName).Info(internal.Pad("ignoring resources of (yet) unsupported provider")) return nil, nil } metaPlugin, err := I...
[ -0.48673704266548157, -0.32786568999290466, 0.43478667736053467, -0.8273752927780151, -0.6270163655281067, 0.2428487092256546, 0.06015239655971527, 0.6216064095497131, 0.038189321756362915, 1.1802234649658203, 0.4176231920719147, 0.3069317936897278, 0.19545258581638336, 0.44647732377052307...
func InitProviders(providerNames []string, installDir string, timeout time.Duration) (map[string]*TerraformProvider, error) { providers := map[string]*TerraformProvider{} for _, pName := range providerNames { p, err := Init(pName, installDir, timeout) if err != nil { return nil, err } if p != nil { p...
[ -1.0139367580413818, 0.0802299901843071, 0.4750106930732727, -0.1722542941570282, 0.39702290296554565, -0.011517097242176533, -0.340761661529541, 0.5782074332237244, -0.31021031737327576, 1.2870839834213257, -0.008601916022598743, -0.41139665246009827, -0.5783603191375732, 1.16697001457214...
func JoinPath(base string, rest ...string) string { result := base for _, next := range rest { if filepath.IsAbs(next) { result = next } else { result = filepath.Join(result, next) } } return result }
[ 0.034518513828516006, -0.6723383069038391, 0.42144453525543213, 0.679120659828186, 0.10577546805143356, 1.1524477005004883, 0.15598410367965698, -1.2635701894760132, -1.0786776542663574, 0.41515591740608215, 0.6827322244644165, -1.3130124807357788, -1.0664520263671875, 0.01181748602539301,...
func TempDirForOutDir(outDir string) (tempPath string) { return filepath.Join(outDir, ".temp") }
[ -0.1480359584093094, -0.9185994267463684, 0.21982614696025848, -0.3900671899318695, -0.8670393824577332, -0.07392942160367966, 0.8030239939689636, 0.40677496790885925, -0.0017168403137475252, -0.031645774841308594, 0.3095855116844177, -0.45501118898391724, 0.029342448338866234, 0.822566449...
func BazelMetricsFilename(s SharedPaths, actionName bazel.RunName) string { return filepath.Join(s.BazelMetricsDir(), actionName.String()+"_bazel_profile.gz") }
[ 1.3165829181671143, -0.33496934175491333, 0.37345221638679504, 0.7479947805404663, 0.4724436104297638, 1.1399649381637573, 1.4324296712875366, 0.4503653049468994, -0.9573471546173096, 0.34068945050239563, -0.19538025557994843, 0.37304866313934326, 0.09423469752073288, -0.40074262022972107,...
func (id *ViewId) CompareTo(o *ViewId) int{ if id.id > o.id { return 1 }else if id.id < o.id { reutrn -1 }else if id.id == o.id { return id.createor.CompareTo(o.creator) } return 0 }
[ -0.2733861207962036, -0.3248516917228699, 0.7223174571990967, -0.3782409131526947, -0.17030023038387299, -0.6829354763031006, 0.5130354762077332, -0.5810188055038452, 0.2725650668144226, -1.2642112970352173, -0.3998301029205322, 0.6033694744110107, 0.3383733034133911, 0.7735122442245483, ...
func layoutFiles() []string { files, err := filepath.Glob(LayoutDir + "*" + TemplateExt) if err != nil { panic(err) } return files }
[ 0.2688520848751068, 0.26167920231819153, 0.5833310484886169, 0.44945836067199707, -1.0484485626220703, 1.254743218421936, 0.6736127734184265, 0.5161542296409607, 0.08389906585216522, 0.056764472275972366, 0.02941695973277092, -0.0248982235789299, -0.8087368011474609, -0.18725396692752838, ...
func NewApplicationContext(r *string) *ApplicationContext { // Connext to Redis c := redis.NewClient(&redis.Options{ Network: "tcp", Addr: *r, }) // Create Application Context return &ApplicationContext{ PoolKey: "sir:pool", AllocatedKey: "sir:allocated", InstanceKey: "sir:instance:%s", Redis...
[ 0.00790833868086338, -0.6602890491485596, 0.3667541742324829, -0.38177749514579773, -1.5113112926483154, 0.06375125795602798, -0.357648640871048, -0.73810875415802, 0.965083658695221, 0.5105030536651611, 0.031112149357795715, -0.05734962597489357, 0.2612076699733734, 0.6674929261207581, ...
func NewClientEncryption(keyVaultClient *Client, opts ...*options.ClientEncryptionOptions) (*ClientEncryption, error) { if keyVaultClient == nil { return nil, errors.New("keyVaultClient must not be nil") } ce := &ClientEncryption{ keyVaultClient: keyVaultClient, } ceo := options.MergeClientEncryptionOptions(o...
[ 0.8255699872970581, 0.2618478536605835, 0.7634019255638123, 0.461157888174057, -0.45836424827575684, -0.33108747005462646, -0.044778335839509964, -0.855182945728302, 0.055754825472831726, 0.4076515734195709, -0.44037970900535583, -0.43426841497421265, -0.6405482292175293, -0.10470195859670...
func (ce *ClientEncryption) CreateEncryptedCollection(ctx context.Context, db *Database, coll string, createOpts *options.CreateCollectionOptions, kmsProvider string, masterKey interface{}) (*Collection, bson.M, error) { if createOpts == nil { return nil, nil, errors.New("nil CreateCollectionOptions") } ef := cr...
[ -0.1269303262233734, -0.0007671843050047755, 0.522291898727417, -0.11568254232406616, 0.26934152841567993, -0.1320173740386963, 0.06049163267016411, -0.5714455246925354, -0.1781633347272873, 0.8322500586509705, -1.0114591121673584, -0.08865915983915329, -0.7217533588409424, 0.4111458361148...
func (ce *ClientEncryption) AddKeyAltName(ctx context.Context, id primitive.Binary, keyAltName string) *SingleResult { filter := bsoncore.NewDocumentBuilder().AppendBinary("_id", id.Subtype, id.Data).Build() keyAltNameDoc := bsoncore.NewDocumentBuilder().AppendString("keyAltNames", keyAltName).Build() update := bson...
[ -0.6605894565582275, -0.40221670269966125, 0.5910176038742065, -0.9887509942054749, -1.3218998908996582, 0.59563809633255, -0.4432670772075653, -0.05269907787442207, -0.018629087135195732, 1.0265291929244995, -0.4066416919231415, -0.2394084483385086, -0.7256025671958923, 0.0691093504428863...
func (ce *ClientEncryption) CreateDataKey(ctx context.Context, kmsProvider string, opts ...*options.DataKeyOptions) (primitive.Binary, error) { // translate opts to mcopts.DataKeyOptions dko := options.MergeDataKeyOptions(opts...) co := mcopts.DataKey().SetKeyAltNames(dko.KeyAltNames) if dko.MasterKey != nil { ...
[ 0.03241506591439247, 0.574135959148407, 0.6484161615371704, 0.0022650149185210466, -0.060692694038152695, 0.4129939675331116, -0.3737756609916687, -0.9256595373153687, 0.051718760281801224, 0.8544797301292419, -0.8090229630470276, 0.3335438072681427, -0.6618447303771973, 0.0861690938472747...
func transformExplicitEncryptionOptions(opts ...*options.EncryptOptions) *mcopts.ExplicitEncryptionOptions { eo := options.MergeEncryptOptions(opts...) transformed := mcopts.ExplicitEncryption() if eo.KeyID != nil { transformed.SetKeyID(*eo.KeyID) } if eo.KeyAltName != nil { transformed.SetKeyAltName(*eo.KeyAl...
[ -0.11963111907243729, -0.03391454368829727, 0.7563984394073486, -0.4083147346973419, 0.46457022428512573, -0.026250557973980904, -0.03133454546332359, 0.054974451661109924, 0.8829736709594727, 0.8273599147796631, -0.5041773915290833, 0.5896689295768738, -0.07607786357402802, 0.286017775535...
func (ce *ClientEncryption) Encrypt(ctx context.Context, val bson.RawValue, opts ...*options.EncryptOptions) (primitive.Binary, error) { transformed := transformExplicitEncryptionOptions(opts...) subtype, data, err := ce.crypt.EncryptExplicit(ctx, bsoncore.Value{Type: val.Type, Data: val.Value}, transformed) if er...
[ 0.12441632151603699, 1.598333716392517, 0.5676606297492981, 0.045551836490631104, -0.5636379718780518, 0.5560135245323181, 0.41389375925064087, -1.3504765033721924, 0.3506236970424652, 0.278502494096756, -0.2193891853094101, 0.6267313957214355, -0.5760167241096497, -0.5529693365097046, 0...
func (ce *ClientEncryption) Decrypt(ctx context.Context, val primitive.Binary) (bson.RawValue, error) { decrypted, err := ce.crypt.DecryptExplicit(ctx, val.Subtype, val.Data) if err != nil { return bson.RawValue{}, err } return bson.RawValue{Type: decrypted.Type, Value: decrypted.Data}, nil }
[ 0.014504514634609222, 1.804653286933899, 0.3830430805683136, 0.23048825562000275, -1.0665150880813599, -0.015278823673725128, 0.16062268614768982, -1.2520238161087036, 0.17995041608810425, 0.38484427332878113, -0.5115289688110352, 0.5287669897079468, -0.40594053268432617, -0.49679020047187...
func (ce *ClientEncryption) Close(ctx context.Context) error { ce.crypt.Close() return ce.keyVaultClient.Disconnect(ctx) }
[ -0.2791203260421753, -0.1269695907831192, 0.4457332193851471, 0.620476484298706, -0.6797394156455994, 0.7033108472824097, -0.08732409030199051, -1.5520833730697632, -0.4375016689300537, 0.24141424894332886, -0.2830890715122223, -0.3094344735145569, -0.8684412837028503, 0.13357897102832794,...
func (ce *ClientEncryption) DeleteKey(ctx context.Context, id primitive.Binary) (*DeleteResult, error) { filter := bsoncore.NewDocumentBuilder().AppendBinary("_id", id.Subtype, id.Data).Build() return ce.keyVaultColl.DeleteOne(ctx, filter) }
[ -0.45017561316490173, 0.9377514123916626, 0.45413100719451904, 0.5049073100090027, -0.21219444274902344, 0.06905225664377213, -0.0016803944017738104, -0.8440013527870178, 0.1841905266046524, 0.06621204316616058, -0.5712186098098755, -0.16696156561374664, -1.1946672201156616, 0.001292100525...
func (ce *ClientEncryption) GetKeyByAltName(ctx context.Context, keyAltName string) *SingleResult { filter := bsoncore.NewDocumentBuilder().AppendString("keyAltNames", keyAltName).Build() return ce.keyVaultColl.FindOne(ctx, filter) }
[ 0.13403019309043884, -0.031225642189383507, 0.20640341937541962, -0.05122504383325577, -0.13519792258739471, 0.38744133710861206, -0.10267233848571777, -0.7852034568786621, -0.5183960199356079, 0.9338564276695251, 0.2821516692638397, -0.425468385219574, -0.5673707723617554, -0.343814104795...
func (ce *ClientEncryption) GetKey(ctx context.Context, id primitive.Binary) *SingleResult { filter := bsoncore.NewDocumentBuilder().AppendBinary("_id", id.Subtype, id.Data).Build() return ce.keyVaultColl.FindOne(ctx, filter) }
[ 0.05281289294362068, 1.2565860748291016, 0.357472687959671, 1.0330878496170044, 0.23550397157669067, -0.10894985496997833, 0.030028603971004486, -1.0645309686660767, -0.27112385630607605, 0.280961275100708, -0.35633984208106995, -0.21211285889148712, -1.2700096368789673, -0.498317420482635...
func (ce *ClientEncryption) GetKeys(ctx context.Context) (*Cursor, error) { return ce.keyVaultColl.Find(ctx, bson.D{}) }
[ 0.10672825574874878, 0.9853910803794861, 0.27004575729370117, 0.7961379885673523, 0.19574236869812012, -0.44411754608154297, 0.07826383411884308, -1.4663903713226318, -0.4426597058773041, 0.18452274799346924, 0.16516971588134766, 0.479023814201355, -0.5635022521018982, -0.0339813157916069,...
func (ce *ClientEncryption) RemoveKeyAltName(ctx context.Context, id primitive.Binary, keyAltName string) *SingleResult { filter := bsoncore.NewDocumentBuilder().AppendBinary("_id", id.Subtype, id.Data).Build() update := bson.A{bson.D{{"$set", bson.D{{"keyAltNames", bson.D{{"$cond", bson.A{bson.D{{"$eq", bson.A{"$k...
[ -0.5481653213500977, -0.960069477558136, 0.7242928147315979, -0.8271280527114868, -1.981679916381836, 0.5744491815567017, -0.1830771565437317, 0.4435023367404938, -0.2918838858604431, 1.2927627563476562, -0.6291701197624207, -0.20347434282302856, -1.145007610321045, -0.050832755863666534, ...
func setRewrapManyDataKeyWriteModels(rewrappedDocuments []bsoncore.Document, writeModels *[]WriteModel) error { const idKey = "_id" const keyMaterial = "keyMaterial" const masterKey = "masterKey" if writeModels == nil { return fmt.Errorf("writeModels pointer not set for location referenced") } // Append a sli...
[ -1.3835930824279785, -0.8168053030967712, 0.8850094079971313, 0.21643085777759552, 0.5516934394836426, -0.03742283582687378, -0.20353077352046967, -0.2889938950538635, -0.39076071977615356, 0.7207601070404053, -0.6523095369338989, 0.5858210921287537, -0.47867417335510254, 0.197821661829948...
func (ce *ClientEncryption) RewrapManyDataKey(ctx context.Context, filter interface{}, opts ...*options.RewrapManyDataKeyOptions) (*RewrapManyDataKeyResult, error) { // libmongocrypt versions 1.5.0 and 1.5.1 have a severe bug in RewrapManyDataKey. // Check if the version string starts with 1.5.0 or 1.5.1. This acco...
[ -0.4312590956687927, 0.17149175703525543, 0.5813716053962708, 0.17919230461120605, -0.2989722788333893, -0.5721766352653503, 0.32032862305641174, -0.3313518166542053, -0.07321537286043167, 0.81172776222229, -0.008600729517638683, 1.541661024093628, -0.25338631868362427, 0.430322527885437, ...
func splitNamespace(ns string) (string, string) { firstDot := strings.Index(ns, ".") if firstDot == -1 { return "", ns } return ns[:firstDot], ns[firstDot+1:] }
[ -1.1672886610031128, -0.07851292937994003, 0.3512668013572693, -0.366545706987381, -0.21506166458129883, -0.6679315567016602, -0.11569076031446457, -0.8795253038406372, 1.602631688117981, 0.018972603604197502, -0.843169629573822, 0.4175548255443573, -0.15668189525604248, 0.1301965564489364...
func TestIssue351MultipleJobRun(t *testing.T) { ctx, err := NewContext(t) if err != nil { t.Fatal(err) } defer ctx.Cleanup() // Create initial CR to generate an initial job and create the initial k8s resources gitops := &gitopsv1alpha1.GitOpsConfig{ TypeMeta: metav1.TypeMeta{ Kind: "GitOpsConfig", ...
[ 0.18322961032390594, 0.25458210706710815, 0.8067548274993896, -0.0314810611307621, 0.4679665267467499, 0.39041343331336975, -0.0963633731007576, 0.46362534165382385, -0.2742161452770233, -0.7041086554527283, -0.602902889251709, -0.31321531534194946, -0.18281693756580353, 0.6672040820121765...
func (a TimeWindowAggregation) Union(other TimeWindowAggregation) TimeWindowAggregation { return TimeWindowAggregation{ Va: a.Va.Union(other.Va), Tw: a.Tw.Union(other.Tw), } }
[ -0.08200331777334213, -0.12523692846298218, 0.7295346260070801, -0.4395642876625061, -0.386288046836853, 0.2703288197517395, -0.1065133735537529, -0.2265329509973526, 0.55889493227005, 0.48951971530914307, 0.6641684770584106, 0.22717586159706116, -0.24848304688930511, 1.014312982559204, ...
func (mock *RepeaterInterfaceMock) MakeRequestCalls() []struct { HttpMethod Method Data io.Reader } { var calls []struct { HttpMethod Method Data io.Reader } mock.lockMakeRequest.RLock() calls = mock.calls.MakeRequest mock.lockMakeRequest.RUnlock() return calls }
[ -1.0235849618911743, 0.5548098683357239, 0.4236682653427124, 0.5229918956756592, -0.21350926160812378, 0.4473663866519928, -0.13418546319007874, -1.3028595447540283, -0.24593889713287354, -0.42078426480293274, 0.3504336476325989, -0.8241404294967651, -0.6515420079231262, -0.232245236635208...
func GetWangyiyunMusicHandler(w http.ResponseWriter, r *http.Request) { vars := mux.Vars(r) //from := vars["from"] query := vars["query"] //fmt.Println(query) output := httpPostMusic(query) // 不缓存数据 w.Header().Set("Pragma", "no-cache") fmt.Fprintln(w, string(output)) }
[ -1.0274457931518555, -0.27087917923927307, 0.8012101054191589, 0.23331695795059204, -0.5720555186271667, 1.172715187072754, 0.8744667172431946, -0.8629540205001831, -0.15082009136676788, -0.6095318794250488, 0.03650665655732155, 0.9516338109970093, -1.5455348491668701, -0.15805061161518097...
func (n *NullDate) Scan(value interface{}) error { if value == nil { n.Date, n.Valid = time.Unix(0, 0), false return nil } n.Valid = true switch value.(type) { case time.Time: n.Date = value.(time.Time) default: n.Date = time.Unix(0, 0) } return nil }
[ -0.5464780926704407, 0.8205425143241882, 0.525408148765564, 0.8298534154891968, -0.5595636367797852, 0.14994022250175476, -0.371608704328537, -0.3626987040042877, 0.5804800391197205, -1.0909119844436646, -0.16825070977210999, 0.5530773401260376, 0.05992976948618889, 1.5061326026916504, 0...
func (n NullDate) Value() (driver.Value, error) { if !n.Valid { return nil, nil } return n.Date, nil }
[ -0.23314803838729858, 0.3432917892932892, 0.31098729372024536, 0.8502192497253418, 0.3511931896209717, 0.22779817879199982, -0.3792976140975952, -0.5968453288078308, 1.0208220481872559, -0.389026939868927, 0.7378918528556824, 0.28680694103240967, -0.31261008977890015, 0.8139324188232422, ...
func (k Querier) Validators(ctx context.Context, req *types.QueryValidatorsRequest) (*types.QueryValidatorsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } // validate the provided status, return all the validators if the status is empty if req.Status != "" &&...
[ -1.5360103845596313, -0.2185138761997223, 0.3620128035545349, -0.44773778319358826, -0.1838856339454651, -0.3956906497478485, -0.7744553685188293, 0.2796613276004791, 0.6303911209106445, 0.04432681202888489, 0.19603200256824493, 0.008425788953900337, -0.35437673330307007, 0.375354707241058...
func (k Querier) Validator(ctx context.Context, req *types.QueryValidatorRequest) (*types.QueryValidatorResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } if req.ValidatorAddr == "" { return nil, status.Error(codes.InvalidArgument, "validator address cannot be ...
[ -1.0876747369766235, -0.3835911750793457, 0.3737758696079254, -0.49608132243156433, -0.5928468108177185, 0.08089599758386612, 0.10001758486032486, 0.01958807185292244, 1.0708069801330566, -0.3169691562652588, 0.6870443820953369, 0.2754392623901367, -0.2261413037776947, 0.594429612159729, ...
func (k Querier) ValidatorDelegations(ctx context.Context, req *types.QueryValidatorDelegationsRequest) (*types.QueryValidatorDelegationsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } if req.ValidatorAddr == "" { return nil, status.Error(codes.InvalidArgume...
[ -0.7846013307571411, 0.0801549106836319, 0.6761844754219055, -0.5145176649093628, -0.23377013206481934, -0.30099883675575256, 0.4659394919872284, -0.3455590605735779, 0.7277088165283203, 0.09598086029291153, 0.3525554835796356, 0.4910985231399536, 0.22102926671504974, 1.1217081546783447, ...
func (k Querier) ValidatorUnbondingDelegations(ctx context.Context, req *types.QueryValidatorUnbondingDelegationsRequest) (*types.QueryValidatorUnbondingDelegationsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } if req.ValidatorAddr == "" { return nil, statu...
[ -1.0451931953430176, 0.4320102035999298, 0.5642483830451965, -0.6372188925743103, -0.3929871916770935, 0.07695036381483078, 0.4488678276538849, -0.3363550305366516, 0.1995726376771927, 0.09082730114459991, 0.2888036370277405, 0.612927258014679, -0.39314770698547363, 0.9041533470153809, 0...
func (k Querier) Delegation(ctx context.Context, req *types.QueryDelegationRequest) (*types.QueryDelegationResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } if req.DelegatorAddr == "" { return nil, status.Error(codes.InvalidArgument, "delegator address cannot ...
[ -0.8082906603813171, -0.03051452897489071, 0.8202649354934692, -0.19227534532546997, 0.0025284059811383486, -0.4895895719528198, -0.3909917175769806, -0.25869622826576233, 1.034817099571228, 0.4568377137184143, 0.7929943799972534, 0.6740092039108276, -0.5944186449050903, 0.1674711257219314...
func (k Querier) UnbondingDelegation(ctx context.Context, req *types.QueryUnbondingDelegationRequest) (*types.QueryUnbondingDelegationResponse, error) { if req == nil { return nil, status.Errorf(codes.InvalidArgument, "empty request") } if req.DelegatorAddr == "" { return nil, status.Errorf(codes.InvalidArgumen...
[ -0.7737270593643188, 0.39755380153656006, 0.8505140542984009, -0.6749658584594727, -0.4322790205478668, 0.37562572956085205, 0.18525540828704834, 0.021070891991257668, 0.47920191287994385, -0.02837797813117504, 0.5221932530403137, 1.0906071662902832, -0.698806643486023, 0.28696784377098083...
func (k Querier) DelegatorDelegations(ctx context.Context, req *types.QueryDelegatorDelegationsRequest) (*types.QueryDelegatorDelegationsResponse, error) { if req == nil { return nil, status.Errorf(codes.InvalidArgument, "empty request") } if req.DelegatorAddr == "" { return nil, status.Error(codes.InvalidArgum...
[ -0.6606383323669434, 0.6688441038131714, 0.7329900860786438, -1.0604026317596436, -0.23573747277259827, -0.26748546957969666, 0.3695318400859833, -0.4594734013080597, 0.9574501514434814, 0.006092798430472612, 0.5019978880882263, 0.5894224643707275, -0.1771761029958725, 0.8977395296096802, ...
func (k Querier) DelegatorValidator(ctx context.Context, req *types.QueryDelegatorValidatorRequest) (*types.QueryDelegatorValidatorResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } if req.DelegatorAddr == "" { return nil, status.Error(codes.InvalidArgument, "d...
[ -1.1840558052062988, 0.16554564237594604, 0.6534203290939331, -0.9835917353630066, -0.9252154231071472, 0.3152385354042053, -0.11143777519464493, 0.36597439646720886, 0.8209575414657593, -0.2692626714706421, 0.6244331002235413, 1.1576571464538574, -0.4814152717590332, 0.7200717926025391, ...
func (k Querier) DelegatorUnbondingDelegations(ctx context.Context, req *types.QueryDelegatorUnbondingDelegationsRequest) (*types.QueryDelegatorUnbondingDelegationsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } if req.DelegatorAddr == "" { return nil, statu...
[ -1.0003854036331177, 0.6979225277900696, 0.6920676827430725, -1.1957217454910278, -0.2445039004087448, 0.11723482608795166, 0.3837803602218628, -0.43017229437828064, 0.39395132660865784, -0.1699696183204651, 0.27917176485061646, 0.9332517981529236, -0.6419325470924377, 0.9966543912887573, ...
func (k Querier) HistoricalInfo(ctx context.Context, req *types.QueryHistoricalInfoRequest) (*types.QueryHistoricalInfoResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } if req.Height < 0 { return nil, status.Error(codes.InvalidArgument, "height cannot be negat...
[ 0.29978621006011963, -0.0961899608373642, 0.5330495834350586, 0.10652496665716171, -0.028636641800403595, 0.13045592606067657, -0.026540664955973625, -0.626571774482727, -1.139642596244812, -0.1483890861272812, -0.03952448070049286, 0.7629923224449158, -0.2011011689901352, 0.27138546109199...
func (k Querier) Redelegations(ctx context.Context, req *types.QueryRedelegationsRequest) (*types.QueryRedelegationsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } var redels types.Redelegations var pageRes *query.PageResponse var err error store := runtim...
[ -1.4064735174179077, 0.7110564112663269, 0.5263646245002747, -0.39755091071128845, 0.1236647516489029, -0.5518149733543396, -0.23130135238170624, 0.13296565413475037, 0.8365524411201477, 0.06727728992700577, 0.7188567519187927, 0.5864137411117554, -0.21068666875362396, 1.2940927743911743, ...