text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func NewLockConcurrentList(list List) List {
mutex := &sync.RWMutex{}
lcc := &lockConcurrentCollection{mutex: mutex, storage: list}
l := &lockConcurrentList{
lockConcurrentCollection: lcc,
list: list,
mutex: mutex,
}
return l
} | [
0.2560904920101166,
-0.3427374064922333,
0.4438585340976715,
0.569024920463562,
-0.6002117395401001,
0.01082112081348896,
0.1235262081027031,
0.23485057055950165,
0.7711910605430603,
0.08848945796489716,
-0.9303032755851746,
-0.5866773724555969,
-0.28401994705200195,
-0.241716668009758,
... |
func NewMetrics() *Metrics {
return &Metrics{items: make(map[string]*metric), rm: &sync.RWMutex{}}
} | [
0.00012991922267246991,
-0.2652823328971863,
0.07634899020195007,
0.16409488022327423,
-0.5531818866729736,
0.09246015548706055,
0.0017086005536839366,
-1.0236736536026,
-0.18713653087615967,
-0.09416623413562775,
0.2851453423500061,
0.49934712052345276,
-0.898485541343689,
-0.080710291862... |
func (m *Metrics) NewCounter(name string, description string) prometheus.Counter {
var item prometheus.Counter
mc := m.Get(name)
if mc == nil {
options := prometheus.CounterOpts{
Name: name,
Help: description,
}
item = prometheus.NewCounter(options)
prometheus.Register(item)
mc = &metric{Name: ... | [
0.3102095127105713,
-0.0731295570731163,
0.7034152746200562,
-0.147788867354393,
-0.43139538168907166,
0.6899611949920654,
-0.8903846144676208,
-0.18964165449142456,
0.04375649243593216,
-0.1401265561580658,
0.4532758295536041,
0.3447369635105133,
-1.0641897916793823,
0.7652668356895447,
... |
func (m *Metrics) NewCounterVec(name string, description string, labels []string) *prometheus.CounterVec {
var item *prometheus.CounterVec
mc := m.Get(name)
if mc == nil {
options := prometheus.CounterOpts{
Name: name,
Help: description,
}
item = prometheus.NewCounterVec(options, labels)
prometheu... | [
-0.3020765483379364,
-0.4278717637062073,
0.6613039374351501,
-0.41374704241752625,
-0.2501462399959564,
0.5151727795600891,
0.07932376861572266,
-0.3270430862903595,
-0.2951773405075073,
-0.3280366063117981,
0.4090541899204254,
0.989257276058197,
-0.4521220624446869,
0.18537409603595734,
... |
func (m *Metrics) NewGauge(name string, description string) prometheus.Gauge {
var item prometheus.Gauge
mc := m.Get(name)
if mc == nil {
options := prometheus.GaugeOpts{
Name: name,
Help: description,
}
item = prometheus.NewGauge(options)
prometheus.Register(item)
mc = &metric{Name: name, Desc... | [
-0.13898815214633942,
0.5595734119415283,
0.725014328956604,
0.20072491466999054,
-0.32640770077705383,
0.2638304531574249,
-1.4371459484100342,
0.05174624174833298,
-0.1931954324245453,
0.6329603791236877,
0.6295867562294006,
0.32339349389076233,
-1.475188970565796,
0.49617889523506165,
... |
func (m *Metrics) GetCounter(name string) prometheus.Counter {
item := m.Get(name)
if item != nil {
return item.Inner.(prometheus.Counter)
}
return nil
} | [
0.5372693538665771,
-0.3039912283420563,
0.6418068408966064,
0.1519445925951004,
-0.2540713846683502,
0.3520680069923401,
-0.5502340793609619,
-0.9360238909721375,
-0.151864156126976,
-0.22837047278881073,
0.5534396171569824,
0.14763200283050537,
-0.6364099979400635,
0.49722787737846375,
... |
func (m *Metrics) GetCounterVec(name string) *prometheus.CounterVec {
item := m.Get(name)
if item != nil {
return item.Inner.(*prometheus.CounterVec)
}
return nil
} | [
0.20074200630187988,
-0.35085591673851013,
0.6644271612167358,
0.005547083914279938,
-0.06609909236431122,
0.41518980264663696,
0.6712285876274109,
-0.8104932904243469,
-0.487612783908844,
-0.21977567672729492,
0.24991382658481598,
1.2995225191116333,
-0.2169656753540039,
0.203408017754554... |
func (m *Metrics) GetGauge(name string) prometheus.Gauge {
item := m.Get(name)
if item != nil {
return item.Inner.(prometheus.Gauge)
}
return nil
} | [
0.20893999934196472,
0.6210036277770996,
0.5066947937011719,
0.8372169733047485,
-0.004550296813249588,
-0.28249603509902954,
-0.858241081237793,
-0.649839460849762,
-0.544761061668396,
0.7845194935798645,
0.9226864576339722,
-0.0757974311709404,
-1.2435884475708008,
0.34277015924453735,
... |
func (m *Metrics) EndpointStarted(endpointName string) prometheus.Gauge {
nc := fmt.Sprintf("endpoint_%s_total_called", strings.ToLower(endpointName))
dc := fmt.Sprintf("Total number of calls to the %s endpoint method", endpointName)
ng := fmt.Sprintf("endpoint_%s_executing", strings.ToLower(endpointName))
dg := ... | [
-0.09801992028951645,
-0.13383466005325317,
0.6980878114700317,
-0.9120264649391174,
0.4192033112049103,
0.06141429767012596,
-0.14943979680538177,
0.15779490768909454,
-0.10088355839252472,
0.6380014419555664,
0.33765459060668945,
0.1598246842622757,
-0.5768568515777588,
0.215407207608222... |
func (m *Metrics) EndpointSuccess(endpointName string) {
name := fmt.Sprintf("endpoint_%s_total_calls", strings.ToLower(endpointName))
description := fmt.Sprintf("Total number of calls to %s endpoint", endpointName)
labels := []string{"code"}
item := m.Get(name)
if item != nil {
item.Inner.(*prometheus.Counte... | [
-0.21793268620967865,
0.453559011220932,
0.6368235349655151,
-0.8113230466842651,
0.4103058874607086,
0.4597194790840149,
0.1070471704006195,
0.39235997200012207,
0.13111232221126556,
0.9854451417922974,
0.11036095768213272,
-0.07602601498365402,
0.33994802832603455,
-0.2105349898338318,
... |
func (m *Metrics) EndpointFailure(endpointName string, errCode string) {
name := fmt.Sprintf("endpoint_%s_total_calls", strings.ToLower(endpointName))
description := fmt.Sprintf("Total number of calls to %s endpoint", endpointName)
labels := []string{"code"}
item := m.Get(name)
if item != nil {
item.Inner.(*p... | [
-0.5270231366157532,
0.012817640788853168,
0.5615156888961792,
-0.681452214717865,
1.019065260887146,
0.030556799843907356,
-0.10205904394388199,
0.37513187527656555,
-0.16588915884494781,
0.37736859917640686,
0.5030190348625183,
0.47420603036880493,
-0.7372240424156189,
0.0520105808973312... |
func NewUniqueIndexWithOptions(o ...option.Option) index.Index {
opts := &option.Options{}
for _, opt := range o {
opt(opts)
}
u := &Unique{
caseInsensitive: opts.CaseInsensitive,
indexBy: opts.IndexBy,
typeName: opts.TypeName,
filesDir: opts.FilesDir,
indexBaseDir: path.Join(o... | [
-0.3705899715423584,
-0.3976873755455017,
0.44854432344436646,
-0.4401427209377289,
-0.26766902208328247,
0.062097109854221344,
0.18952780961990356,
-0.3431044816970825,
1.3819119930267334,
-0.13470222055912018,
-0.9246729612350464,
0.834545910358429,
0.009672759100794792,
-0.9370704889297... |
func (idx *Unique) Init() error {
tokenManager, err := jwt.New(map[string]interface{}{
"secret": idx.cs3conf.JWTSecret,
})
if err != nil {
return err
}
idx.tokenManager = tokenManager
client, err := pool.GetStorageProviderServiceClient(idx.cs3conf.ProviderAddr)
if err != nil {
return err
}
idx.storag... | [
-0.9247036576271057,
0.6930641531944275,
0.6712333559989929,
-0.4782660901546478,
0.3267289698123932,
0.4313419759273529,
0.015157172456383705,
0.35056427121162415,
0.6407611966133118,
-0.1701870858669281,
-0.5751597285270691,
1.1248646974563599,
-0.04623980447649956,
-0.6409043073654175,
... |
func (idx *Unique) Lookup(v string) ([]string, error) {
if idx.caseInsensitive {
v = strings.ToLower(v)
}
searchPath := path.Join(idx.indexRootDir, v)
oldname, err := idx.resolveSymlink(searchPath)
if err != nil {
if os.IsNotExist(err) {
err = &idxerrs.NotFoundErr{TypeName: idx.typeName, Key: idx.indexBy, V... | [
-1.1553584337234497,
0.10550839453935623,
0.4863097071647644,
-0.18871329724788666,
0.41567328572273254,
-0.5835798978805542,
0.48565346002578735,
0.31239748001098633,
0.9668535590171814,
1.041707992553711,
0.0879228338599205,
0.28804081678390503,
-0.4099981188774109,
-0.5730303525924683,
... |
func (idx *Unique) Add(id, v string) (string, error) {
if v == "" {
return "", nil
}
if idx.caseInsensitive {
v = strings.ToLower(v)
}
newName := path.Join(idx.indexRootDir, v)
if err := idx.createSymlink(id, newName); err != nil {
if os.IsExist(err) {
return "", &idxerrs.AlreadyExistsErr{TypeName: idx.t... | [
-0.8706098198890686,
-0.3780096173286438,
0.5431208610534668,
-0.4610610902309418,
0.028374042361974716,
0.09185390919446945,
0.2073884904384613,
0.1890561878681183,
1.307556390762329,
0.10035502165555954,
0.34068384766578674,
0.41923320293426514,
-0.7218496799468994,
-0.38342389464378357,... |
func (idx *Unique) Remove(id string, v string) error {
if v == "" {
return nil
}
if idx.caseInsensitive {
v = strings.ToLower(v)
}
searchPath := path.Join(idx.indexRootDir, v)
_, err := idx.resolveSymlink(searchPath)
if err != nil {
if os.IsNotExist(err) {
err = &idxerrs.NotFoundErr{TypeName: idx.typeNa... | [
-0.7823895812034607,
-0.2588866651058197,
0.7392650842666626,
0.1138216033577919,
-0.32350611686706543,
-0.5719237923622131,
0.14468859136104584,
0.7167094945907593,
1.0211330652236938,
0.6580217480659485,
0.2650037705898285,
0.5882852077484131,
-0.9477448463439941,
-0.7873064875602722,
... |
func (idx *Unique) Update(id, oldV, newV string) error {
if idx.caseInsensitive {
oldV = strings.ToLower(oldV)
newV = strings.ToLower(newV)
}
if err := idx.Remove(id, oldV); err != nil {
return err
}
if _, err := idx.Add(id, newV); err != nil {
return err
}
return nil
} | [
-0.7724476456642151,
-0.31174489855766296,
0.35560673475265503,
-0.7841097712516785,
-0.27957165241241455,
0.022802216932177544,
-1.2321311235427856,
0.18212337791919708,
0.8319560885429382,
0.5682032704353333,
-0.030633389949798584,
0.6346067190170288,
-0.5951029658317566,
-0.691313564777... |
func (idx *Unique) Search(pattern string) ([]string, error) {
if idx.caseInsensitive {
pattern = strings.ToLower(pattern)
}
ctx := context.Background()
t, err := idx.authenticate(ctx)
if err != nil {
return nil, err
}
ctx = metadata.AppendToOutgoingContext(ctx, revactx.TokenHeader, t)
res, err := idx.stor... | [
-1.061448335647583,
0.4992406964302063,
0.8113225102424622,
0.18603874742984772,
0.5672146677970886,
-0.37474000453948975,
0.470130056142807,
0.5375561714172363,
0.7240387201309204,
0.1196109801530838,
0.327709436416626,
0.49132266640663147,
-0.5265916585922241,
-0.16015706956386566,
0.1... |
func (idx *Unique) Delete() error {
ctx, err := idx.getAuthenticatedContext(context.Background())
if err != nil {
return err
}
return deleteIndexRoot(ctx, idx.storageProvider, idx.indexRootDir)
} | [
-0.1613185852766037,
0.7131039500236511,
0.3203231394290924,
0.9434102177619934,
0.9467661380767822,
0.029619969427585602,
0.704513669013977,
0.28920626640319824,
1.566867470741272,
-0.06590103358030319,
-0.05793971195816994,
1.0015971660614014,
-1.10209059715271,
-0.9408693313598633,
0.... |
func ConnectionConfig() *ConnectionConfigApplyConfiguration {
return &ConnectionConfigApplyConfiguration{}
} | [
1.1310527324676514,
-0.49350231885910034,
0.5051383972167969,
-0.16141752898693085,
-0.5033780336380005,
-0.3820885419845581,
-0.2398088127374649,
1.2847137451171875,
0.39928698539733887,
0.646825909614563,
-0.009778104722499847,
-0.3311258852481842,
0.4585392475128174,
0.9866447448730469,... |
func (b *ConnectionConfigApplyConfiguration) WithURL(value string) *ConnectionConfigApplyConfiguration {
b.URL = &value
return b
} | [
0.2988334596157074,
-0.20013095438480377,
0.23834745585918427,
0.157929465174675,
-0.4654588997364044,
0.5611274242401123,
0.28929403424263,
1.1617205142974854,
0.272253155708313,
0.838179886341095,
-0.5508539080619812,
-0.5216346979141235,
0.11827725917100906,
-0.0864524394273758,
0.214... |
func (b *ConnectionConfigApplyConfiguration) WithCA(value v1.ConfigMapNameReference) *ConnectionConfigApplyConfiguration {
b.CA = &value
return b
} | [
-0.1438511610031128,
-0.5369383096694946,
0.19792962074279785,
0.1136135533452034,
-0.38543879985809326,
-0.31949684023857117,
0.9152148365974426,
0.4156128168106079,
0.47348126769065857,
0.3972840905189514,
0.5128600001335144,
-0.0049003190360963345,
0.7197377681732178,
0.6754807829856873... |
func (b *ConnectionConfigApplyConfiguration) WithTLSClientConfig(value v1.SecretNameReference) *ConnectionConfigApplyConfiguration {
b.TLSClientConfig = &value
return b
} | [
1.4345471858978271,
-0.40782874822616577,
0.02672582119703293,
-1.0830978155136108,
-1.2655149698257446,
0.1581745445728302,
-0.4242165684700012,
0.5702469944953918,
-0.2658652365207672,
0.4581121504306793,
-0.9490731358528137,
-0.7349936962127686,
0.9624801874160767,
0.6062477231025696,
... |
func sendShareChatMessage(openID, tenantKey, appID, shareChatID string) error {
user := &protocol.UserInfo{
ID: openID,
Type: protocol.UserTypeOpenID,
}
ctx := context.TODO()
//send group shared card(last param means group chat id, and this message will be sent to this user by openid)
_, err := message.Sen... | [
-0.5106655359268188,
-0.27513253688812256,
0.5546004176139832,
0.16907668113708496,
-0.12933136522769928,
0.8465096354484558,
0.550001859664917,
-1.0511049032211304,
-0.5105217099189758,
0.5016939640045166,
-0.4800846576690674,
0.6974585056304932,
-0.5046653151512146,
0.21945978701114655,
... |
func (r *VSphereDeploymentZone) Default() {
if r.Spec.ControlPlane == nil {
r.Spec.ControlPlane = pointer.BoolPtr(true)
}
} | [
0.8649424910545349,
-0.0444035641849041,
0.19997917115688324,
0.1836024671792984,
1.4970470666885376,
0.8499850630760193,
0.9619627594947815,
0.796717643737793,
0.5414416193962097,
0.022030353546142578,
-0.21743522584438324,
-0.3013674318790436,
-0.9321339726448059,
0.9470190405845642,
-... |
func NewDefaultConfig() *Config {
return &Config{
TTL: env.GetOrDefaultInt(EnvTTL, 600),
PropagationTimeout: env.GetOrDefaultSecond(EnvPropagationTimeout, dns01.DefaultPropagationTimeout),
PollingInterval: env.GetOrDefaultSecond(EnvPollingInterval, dns01.DefaultPollingInterval),
HTTPTimeout: ... | [
0.3716960549354553,
0.5374780297279358,
0.4322437644004822,
0.2316461205482483,
-0.7502469420433044,
-0.5502703189849854,
-0.6513396501541138,
0.29835787415504456,
0.13727521896362305,
0.501552164554596,
-0.9421308636665344,
0.2592191696166992,
0.038075126707553864,
1.428471326828003,
-0... |
func NewDNSProvider() (*DNSProvider, error) {
values, err := env.Get(EnvAccessKey, EnvSecretKey)
if err != nil {
return nil, fmt.Errorf("huaweicloud: %w", err)
}
config := NewDefaultConfig()
config.APIKey = values[EnvAccessKey]
config.SecretKey = values[EnvSecretKey]
config.RegionID = env.GetOrFile(EnvRegionI... | [
-0.36839064955711365,
0.6666285991668701,
-0.0027249653358012438,
0.11303195357322693,
-0.7139959335327148,
-0.15691128373146057,
-1.4494545459747314,
-0.5576778054237366,
0.3984745144844055,
0.9793297052383423,
-0.772871732711792,
0.1486918181180954,
-0.07668992877006531,
1.02409636974334... |
func NewDNSProviderConfig(config *Config) (*DNSProvider, error) {
if config == nil {
return nil, errors.New("huaweicloud: the configuration of the DNS provider is nil")
}
if config.APIKey == "" || config.SecretKey == "" {
return nil, fmt.Errorf("huaweicloud: credentials missing")
}
if config.RegionID == "" {... | [
-0.35180050134658813,
0.6880435347557068,
0.038147103041410446,
-0.01964532397687435,
-1.3414907455444336,
-0.3905436098575592,
-1.0344486236572266,
0.3236406445503235,
0.7082629799842834,
1.032637596130371,
-0.905674159526825,
0.2832479774951935,
-0.41007599234580994,
0.9633326530456543,
... |
func (d *DNSProvider) Timeout() (timeout, interval time.Duration) {
return d.config.PropagationTimeout, d.config.PollingInterval
} | [
-0.9266428351402283,
0.911824643611908,
0.20278812944889069,
-0.26067811250686646,
-0.37450242042541504,
0.6900128126144409,
0.04904727637767792,
0.8671616911888123,
1.1014279127120972,
1.4068340063095093,
-0.726381242275238,
0.8947160840034485,
0.18947219848632812,
0.04463890567421913,
... |
func (d *DNSProvider) Present(domain, token, keyAuth string) error {
fqdn, value := dns01.GetRecord(domain, keyAuth)
zoneName, zoneID, err := d.getHostedZone(domain)
if err != nil {
return fmt.Errorf("huaweicloud: %w", err)
}
log.Infof("fqdn: %+v\n", fqdn)
recordAttributes, err := d.newTxtRecord(zoneName, zon... | [
-0.09752504527568817,
0.716796338558197,
0.34691497683525085,
-0.8579763174057007,
0.38099125027656555,
0.7273833751678467,
-0.47059231996536255,
0.3997330069541931,
-0.48102784156799316,
0.5971124172210693,
0.1636824905872345,
0.3580859899520874,
-0.3828742206096649,
-0.14199504256248474,... |
func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
fqdn, _ := dns01.GetRecord(domain, keyAuth)
records, err := d.findTxtRecords(domain, fqdn)
if err != nil {
return fmt.Errorf("huaweicloud: %w", err)
}
_, zoneID, err := d.getHostedZone(domain)
if err != nil {
return fmt.Errorf("huaweicloud: ... | [
0.14461269974708557,
0.4358176290988922,
0.491561621427536,
-0.0169256329536438,
0.007009249180555344,
-0.41097351908683777,
0.27915385365486145,
-0.04686928540468216,
0.26733434200286865,
0.1622200459241867,
-0.03918365016579628,
0.5968278646469116,
-0.35517847537994385,
0.293180942535400... |
func (_m *Operator) CanOutput() bool {
ret := _m.Called()
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
return r0
} | [
0.07771264761686325,
-0.4651525616645813,
0.48386481404304504,
0.592431902885437,
-0.9242300987243652,
-0.4963638484477997,
1.3079259395599365,
0.7637727856636047,
-0.8862029910087585,
0.17657718062400818,
-0.0657619833946228,
-0.4709225594997406,
-0.18750861287117004,
0.3726380467414856,
... |
func (_m *Operator) CanProcess() bool {
ret := _m.Called()
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
return r0
} | [
0.3626149296760559,
-0.4237591028213501,
0.5685786604881287,
0.16903004050254822,
-0.6090258955955505,
0.2752402722835541,
0.7893785238265991,
0.8999220132827759,
-0.38619720935821533,
0.4119090437889099,
-0.2698962390422821,
0.4497578740119934,
-0.17495107650756836,
-0.16631321609020233,
... |
func (_m *Operator) GetOutputIDs() []string {
ret := _m.Called()
var r0 []string
if rf, ok := ret.Get(0).(func() []string); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
return r0
} | [
-0.8339586853981018,
-0.01519181951880455,
0.5022510886192322,
-0.23535630106925964,
0.010302277281880379,
-0.748090386390686,
0.7213765978813171,
-0.10310466587543488,
-0.47924286127090454,
1.0807825326919556,
0.2224835902452469,
0.24719490110874176,
-0.4193427860736847,
-0.37038210034370... |
func (_m *Operator) ID() string {
ret := _m.Called()
var r0 string
if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(string)
}
return r0
} | [
-0.08060237765312195,
-0.4286937713623047,
0.3391954004764557,
0.3491484820842743,
-0.0325581394135952,
0.03737727925181389,
0.45993444323539734,
0.5610406398773193,
0.6414207220077515,
0.22201906144618988,
-0.2951885163784027,
0.30563992261886597,
-0.43758442997932434,
0.00859786197543144... |
func (_m *Operator) Logger() *zap.SugaredLogger {
ret := _m.Called()
var r0 *zap.SugaredLogger
if rf, ok := ret.Get(0).(func() *zap.SugaredLogger); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*zap.SugaredLogger)
}
}
return r0
} | [
-0.5542731285095215,
0.4824082851409912,
0.6239701509475708,
0.1695679873228073,
0.33534330129623413,
-0.5502194762229919,
0.9036789536476135,
0.7947817444801331,
0.18897482752799988,
-0.47487571835517883,
-0.10789044201374054,
0.22353492677211761,
-0.15225669741630554,
1.1468549966812134,... |
func (_m *Operator) Outputs() []operator.Operator {
ret := _m.Called()
var r0 []operator.Operator
if rf, ok := ret.Get(0).(func() []operator.Operator); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]operator.Operator)
}
}
return r0
} | [
-0.720302402973175,
0.03700387477874756,
0.6184548139572144,
0.25352242588996887,
-0.19539687037467957,
-1.4001296758651733,
1.1964067220687866,
0.038911327719688416,
0.1803591251373291,
0.10230709612369537,
-0.13199833035469055,
-0.23240229487419128,
-0.4873484969139099,
0.631732583045959... |
func (_m *Operator) Process(_a0 context.Context, _a1 *entry.Entry) error {
ret := _m.Called(_a0, _a1)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *entry.Entry) error); ok {
r0 = rf(_a0, _a1)
} else {
r0 = ret.Error(0)
}
return r0
} | [
0.41589322686195374,
-0.4120319187641144,
0.2997899353504181,
-0.8860047459602356,
0.2702861428260803,
-0.11558113992214203,
0.8361647129058838,
0.07973819226026535,
0.13729985058307648,
0.3645791709423065,
0.5927043557167053,
0.015925271436572075,
0.5592196583747864,
0.24986892938613892,
... |
func (_m *Operator) SetOutputIDs(_a0 []string) {
_m.Called(_a0)
} | [
-0.7295007109642029,
-0.5310569405555725,
0.20713087916374207,
-0.7446409463882446,
-0.6312008500099182,
-0.3610813617706299,
1.2797706127166748,
0.3816879391670227,
-0.4570624828338623,
1.5306464433670044,
0.5507078766822815,
0.010087016969919205,
0.5750492215156555,
0.06788388639688492,
... |
func (_m *Operator) SetOutputs(_a0 []operator.Operator) error {
ret := _m.Called(_a0)
var r0 error
if rf, ok := ret.Get(0).(func([]operator.Operator) error); ok {
r0 = rf(_a0)
} else {
r0 = ret.Error(0)
}
return r0
} | [
-0.20956581830978394,
0.03140028193593025,
0.2937444746494293,
-0.4629366099834442,
-0.38325098156929016,
-1.2022240161895752,
1.3620661497116089,
0.09402970224618912,
-0.18024423718452454,
0.33250734210014343,
0.8622210621833801,
-0.5953902006149292,
0.049123093485832214,
1.00204372406005... |
func (_m *Operator) Start(_a0 operator.Persister) error {
ret := _m.Called(_a0)
var r0 error
if rf, ok := ret.Get(0).(func(operator.Persister) error); ok {
r0 = rf(_a0)
} else {
r0 = ret.Error(0)
}
return r0
} | [
0.2685648798942566,
-0.32828742265701294,
0.17978435754776,
-0.17931504547595978,
-0.2871069312095642,
-0.4860515594482422,
1.1669929027557373,
0.9615329504013062,
-0.030998406931757927,
0.6974970698356628,
-0.19174472987651825,
0.8477874398231506,
0.47762060165405273,
0.26362425088882446,... |
func (_m *Operator) Stop() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
} | [
-1.0880448818206787,
0.22536680102348328,
0.5757144093513489,
0.15493826568126678,
-0.1862030178308487,
-0.2620408236980438,
1.128899335861206,
0.6543964147567749,
-0.7026887536048889,
0.46068432927131653,
-0.3785073459148407,
0.13661092519760132,
-0.1798638254404068,
-0.3239865303039551,
... |
func (_m *Operator) Type() string {
ret := _m.Called()
var r0 string
if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(string)
}
return r0
} | [
-0.6188669204711914,
0.22802633047103882,
0.23933106660842896,
0.10040479153394699,
0.2667902708053589,
-0.8205887079238892,
0.6872209906578064,
-0.2753172218799591,
0.14267028868198395,
0.18141430616378784,
0.2433571219444275,
0.7382540106773376,
-0.1989038586616516,
0.12985816597938538,
... |
func NewApplicationsClient(ctx context.Context, log *logrus.Entry, tenantID string, authorizer autorest.Authorizer) ApplicationsClient {
client := graphrbac.NewApplicationsClient(tenantID)
azureclient.SetupClient(ctx, log, "graphrbac.ApplicationsClient", &client.Client, authorizer)
return &applicationsClient{
App... | [
1.0500531196594238,
-0.5507297515869141,
0.13554835319519043,
0.0038561164401471615,
-0.30290767550468445,
-0.5843744874000549,
0.16220618784427643,
-1.221895456314087,
-0.08096182346343994,
-0.24050727486610413,
0.3123215138912201,
0.8902920484542847,
-0.1580919474363327,
0.07579159736633... |
func Start(port string) {
lis, err := net.Listen("tcp", port)
if err != nil {
log.Fatalf("failed to listen: %v", err)
}
s := grpc.NewServer()
project.RegisterProjectServer(s, &projectService{})
service.RegisterServiceServer(s, &serviceService{})
s.Serve(lis)
} | [
0.1077139675617218,
0.5599877238273621,
0.37870684266090393,
-0.5392530560493469,
0.9892776608467102,
0.7288010716438293,
0.6645597815513611,
0.7404141426086426,
-0.713791012763977,
0.3907705843448639,
-0.3973291516304016,
1.022411823272705,
-0.4369475543498993,
0.5033466815948486,
0.031... |
func Score(s string) int {
s = strings.ToUpper(s)
var sum int
for _, r := range s {
sum += runeScore(r)
}
return sum
} | [
-0.4097920358181,
0.37215378880500793,
0.6015579700469971,
-0.02983718179166317,
0.07517296820878983,
-0.5632805228233337,
0.6137081384658813,
0.1288154274225235,
0.24930354952812195,
0.661762535572052,
-0.3124893009662628,
-0.19849222898483276,
-0.8118069767951965,
-0.014596395194530487,
... |
func NewGetStoresParams() *GetStoresParams {
var ()
return &GetStoresParams{
timeout: cr.DefaultTimeout,
}
} | [
0.6531385183334351,
0.04853413254022598,
0.10345937311649323,
0.9511890411376953,
0.5608981847763062,
-0.39715954661369324,
0.06298867613077164,
-0.13515083491802216,
0.17609721422195435,
-0.08069641143083572,
0.027205120772123337,
0.2606717646121979,
-1.0603368282318115,
0.782200992107391... |
func NewGetStoresParamsWithTimeout(timeout time.Duration) *GetStoresParams {
var ()
return &GetStoresParams{
timeout: timeout,
}
} | [
0.9272609949111938,
-0.382712185382843,
0.2143930345773697,
0.8153648376464844,
0.45642489194869995,
0.5648191571235657,
-0.8473929762840271,
-0.24091944098472595,
0.14146842062473297,
0.6531412601470947,
0.3313365876674652,
0.3789925277233124,
-0.9279093146324158,
0.6765115857124329,
0.... |
func NewGetStoresParamsWithContext(ctx context.Context) *GetStoresParams {
var ()
return &GetStoresParams{
Context: ctx,
}
} | [
0.711237907409668,
-0.2558564245700836,
0.33034440875053406,
0.41094326972961426,
0.41352805495262146,
0.5396010875701904,
-0.5511163473129272,
-1.1618313789367676,
0.6047698855400085,
0.19671885669231415,
0.18681618571281433,
0.1955166757106781,
-0.9980158805847168,
0.2597978115081787,
... |
func NewGetStoresParamsWithHTTPClient(client *http.Client) *GetStoresParams {
var ()
return &GetStoresParams{
HTTPClient: client,
}
} | [
0.7646966576576233,
-0.3824227750301361,
0.3460415303707123,
0.4268389642238617,
0.6560090184211731,
0.3810668885707855,
0.1575525999069214,
-0.41893839836120605,
-0.20480340719223022,
-0.057288508862257004,
0.0450163334608078,
0.13210859894752502,
-0.7470101714134216,
0.31329840421676636,... |
func (o *GetStoresParams) WithTimeout(timeout time.Duration) *GetStoresParams {
o.SetTimeout(timeout)
return o
} | [
0.5061094164848328,
0.43321889638900757,
0.09172966331243515,
0.03865215927362442,
0.34687966108322144,
0.5412369966506958,
-0.33360257744789124,
-0.04840948060154915,
1.1023670434951782,
0.34703657031059265,
0.19489769637584686,
0.43996933102607727,
-0.21464528143405914,
0.154956758022308... |
func (o *GetStoresParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
} | [
0.28878480195999146,
0.5313683748245239,
0.029878711327910423,
0.16868697106838226,
1.0123015642166138,
0.9646223187446594,
0.07491694390773773,
0.21769189834594727,
0.6791011095046997,
0.2762819528579712,
0.11857374757528305,
0.754993200302124,
-0.8310456275939941,
0.2615393102169037,
-... |
func (o *GetStoresParams) WithContext(ctx context.Context) *GetStoresParams {
o.SetContext(ctx)
return o
} | [
-0.03333142399787903,
0.6140628457069397,
0.30418676137924194,
0.05596135929226875,
0.1730591207742691,
0.29892697930336,
-0.2002955675125122,
-0.7640843987464905,
1.5152844190597534,
-0.14826448261737823,
0.06838855147361755,
0.23631682991981506,
-0.8590573668479919,
-0.5487571358680725,
... |
func (o *GetStoresParams) SetContext(ctx context.Context) {
o.Context = ctx
} | [
-0.19093665480613708,
0.6426503658294678,
0.15340018272399902,
0.3253825306892395,
0.8244820833206177,
0.6140472292900085,
0.09589643776416779,
-0.4203362762928009,
1.4650490283966064,
-0.17840828001499176,
-0.09436050057411194,
0.5935283899307251,
-1.2937837839126587,
-0.33496224880218506... |
func (o *GetStoresParams) WithHTTPClient(client *http.Client) *GetStoresParams {
o.SetHTTPClient(client)
return o
} | [
0.410137802362442,
-0.2714304029941559,
0.2545521855354309,
-0.1285908818244934,
0.41069597005844116,
-0.06688540428876877,
0.5379242897033691,
-0.5770814418792725,
0.24056051671504974,
-0.41368162631988525,
0.1341351717710495,
0.0947369709610939,
-0.16729779541492462,
-0.3466958999633789,... |
func (o *GetStoresParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
} | [
0.6133758425712585,
-0.09301670640707016,
0.08740381896495819,
-0.5234121084213257,
0.41628023982048035,
0.14544658362865448,
0.7325393557548523,
-0.3050090968608856,
-0.07681617140769958,
-0.3540761172771454,
-0.2241043895483017,
0.6422057151794434,
-1.1133829355239868,
-0.612752914428710... |
func (o *GetStoresParams) WithCount(count *int32) *GetStoresParams {
o.SetCount(count)
return o
} | [
0.07697997987270355,
0.6765786409378052,
0.35849058628082275,
0.39203739166259766,
0.6096447706222534,
-0.14083029329776764,
0.6891160607337952,
-0.4017566740512848,
0.4038054049015045,
-0.033466532826423645,
-0.15348465740680695,
-0.8455279469490051,
-0.13851496577262878,
-0.1874975413084... |
func (o *GetStoresParams) SetCount(count *int32) {
o.Count = count
} | [
-0.2214355766773224,
0.6440081000328064,
0.21841710805892944,
0.5040388107299805,
0.9470608234405518,
0.4591914713382721,
0.7195080518722534,
-0.08665990829467773,
-0.08234341442584991,
-0.1329267919063568,
-0.2955165505409241,
-0.24689561128616333,
-0.9074625968933105,
0.6158065795898438,... |
func (o *GetStoresParams) WithCountryCode(countryCode *string) *GetStoresParams {
o.SetCountryCode(countryCode)
return o
} | [
1.0504646301269531,
-0.16471350193023682,
0.0443568080663681,
0.14288023114204407,
0.18353866040706635,
0.22538672387599945,
0.6805627942085266,
0.04490663856267929,
1.1152364015579224,
0.3604799807071686,
0.11180777102708817,
-0.0743517056107521,
-0.42849236726760864,
0.11120635271072388,... |
func (o *GetStoresParams) SetCountryCode(countryCode *string) {
o.CountryCode = countryCode
} | [
0.5711110830307007,
-0.17972838878631592,
0.06219996511936188,
0.27007707953453064,
0.4850476086139679,
0.4826549291610718,
0.9611833691596985,
0.4030247926712036,
0.594824492931366,
0.265540212392807,
-0.11284326016902924,
0.7020979523658752,
-0.8362687826156616,
0.5939400792121887,
0.2... |
func (o *GetStoresParams) WithDistanceUnit(distanceUnit *string) *GetStoresParams {
o.SetDistanceUnit(distanceUnit)
return o
} | [
-0.009221958927810192,
-0.03455173224210739,
0.35111066699028015,
-0.6460578441619873,
0.0884222462773323,
1.2211859226226807,
-0.12259048223495483,
0.1094224825501442,
0.9385952353477478,
-0.8282646536827087,
-0.1912330836057663,
0.4196109175682068,
-0.8050849437713623,
-0.651702463626861... |
func (o *GetStoresParams) SetDistanceUnit(distanceUnit *string) {
o.DistanceUnit = distanceUnit
} | [
-0.7338785529136658,
-0.10587215423583984,
0.3176148235797882,
-0.8768340945243835,
0.33023300766944885,
1.5207082033157349,
0.01158297061920166,
0.22248885035514832,
0.534545361995697,
-0.7649489045143127,
-0.44253891706466675,
1.0704847574234009,
-1.3131914138793945,
-0.3191637098789215,... |
func (o *GetStoresParams) WithLatitude(latitude *float64) *GetStoresParams {
o.SetLatitude(latitude)
return o
} | [
0.01661701127886772,
0.019651008769869804,
0.02180502377450466,
-0.010053853504359722,
0.6728656888008118,
0.3176628649234772,
-0.03251688927412033,
-0.2886831760406494,
0.23964984714984894,
0.21953928470611572,
-0.012500166893005371,
-1.0682942867279053,
-0.7196353077888489,
-0.3312964439... |
func (o *GetStoresParams) SetLatitude(latitude *float64) {
o.Latitude = latitude
} | [
-0.26879554986953735,
0.09879773110151291,
0.02443111501634121,
0.16265040636062622,
0.8842790126800537,
0.6647201180458069,
0.37209001183509827,
-0.0686422809958458,
0.10148032009601593,
0.3665233254432678,
0.055816780775785446,
-0.42998653650283813,
-1.401030421257019,
0.2160551249980926... |
func (o *GetStoresParams) WithLongitude(longitude *float64) *GetStoresParams {
o.SetLongitude(longitude)
return o
} | [
0.47267475724220276,
0.08192574232816696,
0.1288144588470459,
0.01289115659892559,
0.5057138800621033,
-0.11076556146144867,
-0.32882967591285706,
0.01798170432448387,
1.0596200227737427,
0.07134399563074112,
-0.4490260183811188,
-0.8316723704338074,
-0.5494515299797058,
-0.195516884326934... |
func (o *GetStoresParams) SetLongitude(longitude *float64) {
o.Longitude = longitude
} | [
0.12405355274677277,
0.05371380224823952,
0.09950964897871017,
0.3154529631137848,
0.8202915787696838,
0.21947915852069855,
0.034046683460474014,
0.29072925448417664,
0.6490427255630493,
0.19216804206371307,
-0.5583324432373047,
-0.21841666102409363,
-1.2411850690841675,
0.5290741920471191... |
func (o *GetStoresParams) WithMaxDistance(maxDistance *float64) *GetStoresParams {
o.SetMaxDistance(maxDistance)
return o
} | [
-0.13759052753448486,
0.11629414558410645,
0.07841070741415024,
0.7507199645042419,
-0.2655376195907593,
0.4376421570777893,
-0.5973439812660217,
0.4965720474720001,
1.344880223274231,
0.032215192914009094,
-0.315247118473053,
-0.41578924655914307,
-0.32189297676086426,
-0.1093045920133590... |
func (o *GetStoresParams) SetMaxDistance(maxDistance *float64) {
o.MaxDistance = maxDistance
} | [
-0.373954713344574,
-0.023634864017367363,
0.08583573997020721,
0.6747389435768127,
0.05606598034501076,
0.7054014801979065,
-0.23989903926849365,
0.6496329307556152,
0.9683334231376648,
0.03569302335381508,
-0.44328299164772034,
0.3800254166126251,
-0.8383241295814514,
0.2623668611049652,... |
func (o *GetStoresParams) WithPostalCode(postalCode *string) *GetStoresParams {
o.SetPostalCode(postalCode)
return o
} | [
0.28333157300949097,
-0.21021752059459686,
0.11402599513530731,
0.35136640071868896,
0.1545926332473755,
0.07703639566898346,
-0.1388195902109146,
0.4152689278125763,
1.357350468635559,
0.2302294820547104,
0.5727726817131042,
-0.4871406555175781,
-0.23208937048912048,
-0.005503474269062281... |
func (o *GetStoresParams) SetPostalCode(postalCode *string) {
o.PostalCode = postalCode
} | [
0.0492117665708065,
-0.28142186999320984,
0.19824129343032837,
0.25331512093544006,
0.41066110134124756,
0.2847786843776703,
0.03405250236392021,
0.7884112596511841,
0.9719491004943848,
0.029945489019155502,
0.23960208892822266,
0.26431015133857727,
-0.873275637626648,
0.3535372018814087,
... |
func (o *GetStoresParams) WithStart(start *int32) *GetStoresParams {
o.SetStart(start)
return o
} | [
0.15569844841957092,
0.08664794266223907,
0.15129753947257996,
-0.09064832329750061,
0.5524829030036926,
0.008092950098216534,
0.48339611291885376,
-0.38893768191337585,
0.8253036141395569,
-0.20683462917804718,
-0.029269613325595856,
0.1422838419675827,
-0.46392086148262024,
-0.7709132432... |
func (o *GetStoresParams) SetStart(start *int32) {
o.Start = start
} | [
-0.30426082015037537,
0.10724792629480362,
0.0733579620718956,
0.2149920016527176,
0.8395119309425354,
0.44213321805000305,
0.814070999622345,
0.0008620024309493601,
0.28823113441467285,
0.02778177335858345,
-0.526586651802063,
0.7591423988342285,
-1.2426812648773193,
-0.2836475372314453,
... |
func (o *GetStoresParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Count != nil {
// query param count
var qrCount int32
if o.Count != nil {
qrCount = *o.Count
}
qCount := swag.FormatInt32... | [
-0.7772737741470337,
-0.20068234205245972,
0.9166854023933411,
-1.0611248016357422,
0.5623781681060791,
0.18401044607162476,
0.6329033374786377,
-0.344577819108963,
-0.08417623490095139,
0.1631043404340744,
-0.05694087594747543,
0.6711006164550781,
-0.4395838975906372,
0.44558247923851013,... |
func (je *JettisonError) Format(state fmt.State, c rune) {
withParams := state.Flag(int('#')) || state.Flag(int('+'))
p := &printer{Writer: state, detailed: withParams}
next := je
for {
pre := p.written
res := next.FormatError(p)
if res == nil {
return
}
if p.written > pre {
_, _ = p.Write([]byte(":... | [
0.0124048488214612,
-0.910915195941925,
0.5591745972633362,
-0.781841516494751,
-0.22122515738010406,
-0.5544924139976501,
0.21407924592494965,
-0.40266239643096924,
0.17126548290252686,
0.3741815388202667,
1.257311463356018,
0.7804991006851196,
0.30332908034324646,
0.6751325726509094,
0... |
func (je *JettisonError) Clone() *JettisonError {
res := JettisonError{
Message: je.Message,
OriginalErr: je.OriginalErr,
}
for _, h := range je.Hops {
res.Hops = append(res.Hops, h.Clone())
}
return &res
} | [
-0.026019537821412086,
-1.0508517026901245,
0.5540838241577148,
0.7152025103569031,
-1.4443771839141846,
0.6218238472938538,
0.22393377125263214,
-0.8158847093582153,
0.3864126205444336,
0.5942992568016052,
0.813598096370697,
0.4318840205669403,
-0.7872136235237122,
-0.5169710516929626,
... |
func (je *JettisonError) Unwrap() error {
err := je.Clone() // Don't want to modify the reference
for len(err.Hops) > 0 {
if len(err.Hops[0].Errors) == 0 {
err.Hops = err.Hops[1:]
continue
}
err.Hops[0].Errors = err.Hops[0].Errors[1:]
break
}
// Remove any empty hop layers.
for len(err.Hops) > 0 {... | [
-0.08050494641065598,
-0.2325800210237503,
0.7685670852661133,
-0.2132493555545807,
-1.0645729303359985,
-0.5790912508964539,
0.3654525578022003,
-0.3498842716217041,
0.29355740547180176,
0.5979408621788025,
0.8088377118110657,
1.005183219909668,
-0.011803503148257732,
-0.3486209213733673,... |
func (je *JettisonError) Is(target error) bool {
if je == nil || target == nil {
return false
}
targetJErr, ok := target.(*JettisonError)
if !ok {
return false
}
if je == targetJErr {
return true
}
targetErr, ok := targetJErr.LatestError()
if !ok {
return false
}
// If target doesn't have an erro... | [
-1.312669038772583,
-0.49823877215385437,
0.5303347706794739,
0.0369049608707428,
-0.43415021896362305,
-0.7990296483039856,
-0.8244758248329163,
-0.4201074540615082,
1.1025028228759766,
0.3002518117427826,
1.1279267072677612,
1.1454702615737915,
0.7496377825737,
0.11682994663715363,
-0.... |
func (je *JettisonError) GetKey(key string) (string, bool) {
for _, h := range je.Hops {
for _, e := range h.Errors {
for _, p := range e.Parameters {
if p.Key == key {
return p.Value, true
}
}
}
}
return "", false
} | [
-1.0876606702804565,
0.10036405175924301,
0.7503629922866821,
0.5921263694763184,
-0.614547848701477,
-0.30882057547569275,
0.11976732313632965,
-0.2531083822250366,
-0.33510661125183105,
1.3323371410369873,
0.3968914747238159,
-0.46896541118621826,
-0.7395660877227783,
0.5876705646514893,... |
func (je *JettisonError) GetKeyValues() map[string]string {
keyValues := make(map[string]string)
for _, h := range je.Hops {
for _, e := range h.Errors {
for _, p := range e.Parameters {
keyValues[p.Key] = p.Value
}
}
}
return keyValues
} | [
-0.5855002403259277,
-0.3745007812976837,
0.6199977993965149,
-0.05532720312476158,
-0.6750409007072449,
-0.3231235146522522,
-0.5631121397018433,
-0.13973760604858398,
-0.631070613861084,
-0.08352271467447281,
0.1286941021680832,
0.5088056921958923,
-0.05072958767414093,
1.113605499267578... |
func NewGame(playerOne *Player, playerTwo *Player) Game {
// Ideally we'd enforce uniqueness and store game in a DB
id := rand.Intn(100000)
rows := [][]string{{"", "", ""}, {"", "", ""}, {"", "", ""}}
game := Game{id, playerOne.ID, rows, playerOne.ID, playerTwo.ID, "active"}
return game
} | [
-0.25328493118286133,
-0.6572834849357605,
0.8209429979324341,
-0.14237825572490692,
-0.008557810448110104,
0.47320646047592163,
-1.2193721532821655,
-0.6936988830566406,
-0.4717930257320404,
0.9592398405075073,
0.014201642014086246,
-0.8924424648284912,
-1.0315837860107422,
-0.19183193147... |
func NewPostgres() *sql.DB {
prefix := ""
if os.Getenv("ENVIRONMENT") == "test" {
prefix += "TEST_"
}
username := os.Getenv(prefix + "POSTGRES_USER")
password := os.Getenv(prefix + "POSTGRES_PASSWORD")
host := os.Getenv(prefix + "POSTGRES_HOST")
port := os.Getenv(prefix + "POSTGRES_PORT")
dbName := os.Getenv(... | [
0.21529322862625122,
0.06391804665327072,
0.8580390810966492,
-0.19097554683685303,
-0.7398459911346436,
0.16136258840560913,
-0.31810885667800903,
0.1335887908935547,
-1.1528842449188232,
0.47113466262817383,
0.2664853632450104,
0.7455798387527466,
-1.3725016117095947,
0.4857342839241028,... |
func setupRouter() *gin.Engine {
app := gin.New()
gin.SetMode(gin.DebugMode)
// Middlewares
// Allow CORS from the AWS frontend. We store the AWS url in the environment
app.Use(cors.New(cors.Config{
AllowOrigins: []string{"http://localhost:3000", os.Getenv("FRONTEND_URL")},
AllowMethods: []string{"PUT... | [
-0.35726964473724365,
-0.11619029194116592,
0.9093811511993408,
0.15830445289611816,
0.7816762924194336,
0.29121628403663635,
0.057965151965618134,
0.3548990786075592,
-0.08106079697608948,
-0.23635947704315186,
0.501568615436554,
0.288406103849411,
-0.28431278467178345,
1.1027824878692627... |
func NewK8S(
name string,
namespace string,
uid string,
) Driver {
return &K8S{name, namespace}
} | [
-0.5287111401557922,
-1.1335855722427368,
-0.01797591708600521,
0.07697920501232147,
-1.5008000135421753,
-0.8074843287467957,
-1.6577950716018677,
-0.789903461933136,
0.6943893432617188,
0.33787769079208374,
0.2502729296684265,
0.5314112901687622,
-0.4733104705810547,
-0.3872472047805786,... |
func (k *K8S) Path() string {
return k.name + "-root-master-key"
} | [
-0.19729019701480865,
-0.8046134114265442,
0.3709633946418762,
0.5439097285270691,
-0.9455668926239014,
1.1404809951782227,
-0.4166959524154663,
-1.034483790397644,
-0.27631598711013794,
0.8412160277366638,
-0.3124349117279053,
0.13061079382896423,
-0.16780227422714233,
0.36596450209617615... |
func (*K8S) Name() string {
return "cipher_key_b64"
} | [
-0.4662177264690399,
-0.6006485819816589,
0.5230167508125305,
0.8544793725013733,
-0.6815471649169922,
0.26394474506378174,
-0.26477113366127014,
-0.6742243766784668,
-0.03377331793308258,
1.61620032787323,
-0.8671852946281433,
0.26584112644195557,
0.43002551794052124,
0.5335372686386108,
... |
func (k *K8S) GetContext() map[string]string {
return k8sContext(k.ns)
} | [
-0.23701384663581848,
-0.39061102271080017,
0.4849812388420105,
0.3949306309223175,
-0.16708804666996002,
-0.4070941209793091,
-1.170352578163147,
-1.3012889623641968,
1.1442426443099976,
0.31632766127586365,
-0.5884014368057251,
0.8334769010543823,
0.7696588635444641,
0.4015633463859558,
... |
func (k *K8S) SetContext() map[string]string {
return k8sContext(k.ns)
} | [
-0.6769732236862183,
-0.32756751775741577,
0.45966291427612305,
0.23258188366889954,
-0.34015756845474243,
-0.34306246042251587,
-1.3181416988372803,
-1.0564669370651245,
1.1185182332992554,
0.4595795273780823,
-0.9511117935180664,
0.6172358989715576,
0.7771551609039307,
0.6297882795333862... |
func (k *K8S) DeleteContext() map[string]string {
return k8sContext(k.ns)
} | [
-0.32936999201774597,
-0.8746560215950012,
0.5465465784072876,
-0.1442037969827652,
-0.4712190330028534,
-0.21946991980075836,
-1.1580685377120972,
-0.9430007934570312,
1.7303720712661743,
-0.07695160806179047,
-0.6754888296127319,
0.654942512512207,
0.8541509509086609,
0.9717758893966675,... |
func (k *K8S) Config(map[string]string, string, string) (map[string]interface{}, error) {
return nil, nil
} | [
-0.09548800438642502,
-0.8372313976287842,
0.6998186111450195,
-0.07442839443683624,
0.038376979529857635,
0.04013630002737045,
-0.4935079514980316,
0.8803272247314453,
-0.17606712877750397,
-0.07115776091814041,
-0.08882168680429459,
0.4924723505973816,
0.5130307674407959,
0.3520355224609... |
func (k *K8S) Version(kms *KMS) Version {
return &VersionRotatingSecret{VersionBase{kms, nil}, k.name, k.ns}
} | [
-0.10632620006799698,
-0.8582789897918701,
0.18923631310462952,
0.5976322293281555,
-0.15523424744606018,
0.29042699933052063,
-0.7907430529594421,
-1.1110881567001343,
0.7816734910011292,
0.5775403380393982,
-1.2684048414230347,
-0.3569110333919525,
0.011610137298703194,
-0.24205718934535... |
func init() {
if err := RegisterDriver(k8s.Name, NewK8S); err != nil {
panic(err.Error())
}
} | [
0.14275112748146057,
0.1306329369544983,
0.5155623555183411,
0.38502636551856995,
0.9448270797729492,
0.11560113728046417,
-1.4965835809707642,
0.4460509717464447,
-0.23848961293697357,
0.7247786521911621,
-0.34875941276550293,
0.5327622294425964,
-0.17516538500785828,
0.6931900382041931,
... |
func New(meta interface{}) *Broadcaster {
listenc := make(chan (chan (chan broadcast)))
sendc := make(chan interface{})
go func() {
currc := make(chan broadcast, 1)
for {
select {
case v, ok := <-sendc:
if !ok {
return
}
c := make(chan broadcast, 1)
b := broadcast{c: c, v: v}
currc... | [
-0.3473479449748993,
-0.2878108620643616,
0.5136232376098633,
-0.094352588057518,
-0.6974149346351624,
-0.7829405069351196,
0.48909711837768555,
-0.5348813533782959,
-0.15835998952388763,
0.5140009522438049,
0.18537358939647675,
1.0022804737091064,
-0.374732106924057,
0.9109903573989868,
... |
func (b *Broadcaster) Notify(typpedChan interface{}) error {
tp := reflect.TypeOf(typpedChan)
outC := reflect.ValueOf(typpedChan)
if tp.Kind() != reflect.Chan {
return errors.New("input parameter should be channel")
}
if tp.ChanDir() == reflect.RecvDir {
return errors.New("channel should be writable")
}
if t... | [
-0.641980767250061,
0.1199234277009964,
0.726061224937439,
-0.04106910899281502,
0.44220247864723206,
-0.15451200306415558,
0.6413641571998596,
-0.5303073525428772,
0.18190370500087738,
0.041229140013456345,
-0.06156320124864578,
1.4545410871505737,
-0.4889553487300873,
0.625547468662262,
... |
func (b *Broadcaster) Send(v interface{}) { b.Sendc <- v } | [
-0.08086679130792618,
0.7523294687271118,
0.2552580237388611,
0.9473041296005249,
0.13731025159358978,
0.44660601019859314,
0.6258733868598938,
-0.8677114844322205,
0.0261190477758646,
0.3319914638996124,
-0.5030893087387085,
0.8717604875564575,
-0.6021459698677063,
1.4222694635391235,
-... |
func makeBag(s string) Bag {
bag := make(Bag)
for i := 0; i < len(s); i++ {
bag.Add(s[i])
}
return bag
} | [
-0.3606323301792145,
-0.28204911947250366,
0.18303728103637695,
0.3872204124927521,
-0.16714657843112946,
0.9180635213851929,
-0.3107503354549408,
0.08561892062425613,
-0.11000535637140274,
-0.2560996115207672,
-0.8902894258499146,
0.46917596459388733,
-0.10258215665817261,
-0.437422543764... |
func (b *Bag) Len() int {
sum := 0
for _, v := range *b {
sum += int(v)
}
return sum
} | [
-0.15013794600963593,
-0.1709492951631546,
0.19417430460453033,
0.3746383786201477,
0.5414747595787048,
0.04146898165345192,
1.1248142719268799,
0.5124128460884094,
-0.04321412369608879,
-0.3300338089466095,
-1.934397578239441,
-0.3076764643192291,
0.016465868800878525,
0.26105037331581116... |
func (b *Bag) Add(x byte) {
(*b)[x]++
} | [
-0.9833210110664368,
-0.4465595781803131,
0.290710985660553,
0.35133495926856995,
0.30119389295578003,
1.4051132202148438,
-0.6413415670394897,
-0.7099199891090393,
0.5452484488487244,
-0.4331858456134796,
-2.093852996826172,
0.5376195311546326,
-0.6102961897850037,
0.8370620012283325,
0... |
func bagEq(b, c Bag) bool {
if len(b) != len(c) {
return false
}
for k, v := range b {
if v != c[k] {
return false
}
}
return true
} | [
-0.6061169505119324,
-0.46019816398620605,
0.7569724321365356,
1.200313687324524,
0.6284753084182739,
0.7601108551025391,
-0.743965744972229,
0.49354687333106995,
-1.347445011138916,
0.7131261229515076,
-1.5904146432876587,
-0.10612311959266663,
-0.7512494325637817,
0.44220879673957825,
... |
func (b *Bag) Delete(x byte) {
_, ok := (*b)[x]
if ok {
(*b)[x]--
}
} | [
0.4784969985485077,
-0.03891436383128166,
0.35848134756088257,
0.6457874774932861,
0.7031316757202148,
1.0711822509765625,
-0.15918146073818207,
-0.4093528687953949,
0.3002886474132538,
0.2796597182750702,
-1.9975470304489136,
0.2779504954814911,
-0.9941057562828064,
0.20467491447925568,
... |
func (b *Bag) Find(x byte) (int, bool) {
count, ok := (*b)[x]
return count, ok
} | [
-0.30130529403686523,
-0.3155190646648407,
0.5750572085380554,
0.018295058980584145,
-0.40699291229248047,
0.2928127944469452,
0.374357670545578,
-0.6609524488449097,
-0.8101862668991089,
0.6871066093444824,
-2.1778364181518555,
-0.5903289914131165,
-0.9235522150993347,
1.0372892618179321,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.