text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func testCmdUnmountFilesystem(t *testing.T) {
t.Log("TODO")
} | [
0.8168455362319946,
-0.2878047525882721,
0.5833762288093567,
0.5833761096000671,
1.3788832426071167,
0.21984395384788513,
0.9142308831214905,
0.21450230479240417,
0.3657166659832001,
-1.4685596227645874,
-0.169209286570549,
-0.3521963059902191,
0.23579837381839752,
0.5397496223449707,
-1... |
func testFullCycleFilesystem(t *testing.T) {
t.Log("TODO")
} | [
1.327143907546997,
-0.03247342258691788,
0.5196103453636169,
0.526433527469635,
0.4672410488128662,
0.4792596995830536,
1.5101752281188965,
-0.21125702559947968,
0.6603555083274841,
-1.663122534751892,
-0.6150141954421997,
0.11234542727470398,
0.11941446363925934,
0.20102082192897797,
-0... |
func NewDefaultSelector() (*DefaultSelector, error) {
s := &DefaultSelector{
sources: make(map[string]*source),
}
return s, nil
} | [
-0.7125732898712158,
-0.6858241558074951,
-0.04860833287239075,
-0.7114077210426331,
0.058287229388952255,
-0.8703961968421936,
-0.5156511664390564,
-0.33460208773612976,
0.4239770770072937,
-1.1628211736679077,
-0.8566768169403076,
-0.2052714079618454,
-0.6373966336250305,
0.7197347283363... |
func (s *DefaultSelector) AddSource(name string, src Source) {
s.Lock()
defer s.Unlock()
s.sources[name] = &source{src, false}
} | [
-1.0859686136245728,
0.5805097818374634,
-0.005870435852557421,
0.6070613861083984,
0.10361253470182419,
-0.5089813470840454,
-0.442227303981781,
-0.003108725417405367,
0.45567283034324646,
-0.2057369351387024,
-1.1609879732131958,
-0.3727732002735138,
-0.9373223185539246,
0.64587843418121... |
func (s *DefaultSelector) RemoveSource(name string) error {
s.Lock()
defer s.Unlock()
if _, ok := s.sources[name]; !ok {
return fmt.Errorf("unknown source %s", name)
}
delete(s.sources, name)
return nil
} | [
-0.830184280872345,
0.5684357285499573,
0.2601379156112671,
0.2997017502784729,
-0.008831131272017956,
-1.1980384588241577,
0.11185844242572784,
0.40595680475234985,
0.6622886061668396,
0.40098467469215393,
-1.1976401805877686,
-0.6678770184516907,
-0.9213192462921143,
0.39829447865486145,... |
func (s *DefaultSelector) SetSource(name string) error {
s.Lock()
defer s.Unlock()
if s.onDataCb == nil {
return fmt.Errorf("selector callback not set")
}
if _, ok := s.sources[name]; !ok {
return fmt.Errorf("unknown source %s", name)
}
for _, src := range s.sources {
src.active = false
src.Stop()
s... | [
-0.9458276629447937,
0.0939435362815857,
0.32659971714019775,
0.5831748843193054,
0.13836784660816193,
-0.4833123981952667,
0.572252094745636,
0.19433805346488953,
0.44391390681266785,
0.5050943493843079,
-1.2885562181472778,
-0.35061487555503845,
-0.7059611678123474,
0.9863414764404297,
... |
func (s *DefaultSelector) SetOnDataCb(cb OnDataCb) {
s.Lock()
defer s.Unlock()
s.onDataCb = cb
} | [
0.13964015245437622,
-0.22499077022075653,
0.3097738027572632,
0.2393421083688736,
0.6799290776252747,
0.6864559054374695,
0.1312941461801529,
-0.1897023618221283,
0.0672457367181778,
-0.3452240228652954,
-1.2780362367630005,
0.5656697154045105,
-0.14252856373786926,
0.21441419422626495,
... |
func (s *DefaultSelector) Close() {
s.Lock()
defer s.Unlock()
for _, src := range s.sources {
src.active = false
if err := src.Stop(); err != nil {
log.Println(err)
}
if err := src.Close(); err != nil {
log.Println(err)
}
}
} | [
-1.0769342184066772,
-0.9589850306510925,
0.32529786229133606,
-0.890834391117096,
0.5944653153419495,
0.18570677936077118,
0.7677151560783386,
-0.21973180770874023,
-0.696360170841217,
-0.1095745638012886,
0.3656921088695526,
-0.7297153472900391,
-1.2870732545852661,
0.7538455128669739,
... |
func (api *entities) ShapeNestedObjects() error {
for _, file := range api.Structs {
for _, item := range file {
for _, nested := range item.NestedObjects {
if s, ok := api.NestedStructs[nested.ForeignKey.Type]; ok {
nested.Object = s
nested.ForeignKey.ForeignName = s.getForeignKeyName(nested.Foreig... | [
-0.6134359240531921,
-0.6597481966018677,
0.6548842787742615,
-1.1403589248657227,
0.9536111354827881,
0.16713321208953857,
0.926790177822113,
-0.2704678177833557,
-0.7965583205223083,
0.12960860133171082,
-0.6605210304260254,
0.013887166976928711,
-0.30274027585983276,
0.0883413553237915,... |
func (api *entities) Copy(fileName string) *fileEntities {
if _, ok := api.Structs[fileName]; !ok {
return nil
}
if len(api.Structs[fileName]) == 0 {
return nil
}
return &fileEntities{
Package: api.Package,
Structs: api.Structs[fileName],
NestedStructs: api.NestedStructs,
Types: ap... | [
-0.7148176431655884,
-1.3663839101791382,
0.5729306936264038,
-0.521327555179596,
-0.1499980241060257,
0.9278327226638794,
0.12041480094194412,
-0.026367157697677612,
-0.1814640611410141,
-0.15782085061073303,
0.22354647517204285,
-0.09394784271717072,
-0.6606178879737854,
0.25083819031715... |
func Auth(r *http.Request) ([]byte, error) {
token, err := AuthToken(r)
if err != nil {
return nil, err
}
if token {
return []byte(getToken(r)), nil
}
newToken := newToken()
return save(newToken), nil
} | [
-0.7306497693061829,
-0.0021665438544005156,
0.444305956363678,
0.5334388613700867,
0.3719894587993622,
-0.3058558404445648,
-0.4165111482143402,
-0.3651295006275177,
0.6952064037322998,
-0.7749710083007812,
-0.8632493019104004,
0.8353612422943115,
0.35977092385292053,
-0.04354423284530639... |
func AuthToken(r *http.Request) (bool, error) {
token := getToken(r)
exist, err := redisClient.SIsMember(dbToken, string(token)).Result()
if err != nil {
log.Printf("error with redis occurred, error : %v", err)
return false, err
}
return exist, nil
} | [
-0.6646609902381897,
0.8312109708786011,
0.7282475829124451,
-0.015214311890304089,
0.3357752561569214,
0.05509846284985542,
-0.627532422542572,
0.805519163608551,
0.1022660955786705,
-0.15605668723583221,
-0.9581705927848816,
0.7124244570732117,
-0.3449874222278595,
0.4642864763736725,
... |
func getToken(r *http.Request) string {
return r.Header.Get("Authorization")
} | [
-0.19277596473693848,
0.13330870866775513,
0.5878099799156189,
1.3702316284179688,
0.16403844952583313,
-0.18610069155693054,
0.17059770226478577,
0.749870777130127,
0.10445091128349304,
-0.3721686899662018,
0.6888918280601501,
0.7600693106651306,
0.9852442741394043,
0.10546261817216873,
... |
func (*TabletStatusPB) Descriptor() ([]byte, []int) {
return file_yb_tablet_tablet_proto_rawDescGZIP(), []int{0}
} | [
0.445700466632843,
0.4207780659198761,
0.301569402217865,
0.8041096329689026,
-0.14634716510772705,
1.3884401321411133,
0.21296238899230957,
-0.4028533399105072,
-0.48490041494369507,
-0.23538421094417572,
-0.6498239040374756,
-0.3360181152820587,
0.07426110655069351,
1.2034035921096802,
... |
func (*MaintenanceManagerStatusPB) Descriptor() ([]byte, []int) {
return file_yb_tablet_tablet_proto_rawDescGZIP(), []int{1}
} | [
0.179738849401474,
-0.3612728714942932,
0.46555033326148987,
0.8269195556640625,
-0.47095370292663574,
1.0944178104400635,
-0.46638375520706177,
-0.24801801145076752,
-0.0841333195567131,
-0.5029147863388062,
-0.18288426101207733,
-0.4772958755493164,
-0.5716350674629211,
1.590688228607177... |
func (*MaintenanceManagerStatusPB_MaintenanceOpPB) Descriptor() ([]byte, []int) {
return file_yb_tablet_tablet_proto_rawDescGZIP(), []int{1, 0}
} | [
-0.4346047639846802,
-0.2516365647315979,
0.6520980000495911,
0.3620488941669464,
-0.2786133587360382,
1.1678798198699951,
-0.05656072497367859,
-0.09757211804389954,
-0.21272213757038116,
-0.5257253050804138,
0.5049151182174683,
-1.1120142936706543,
-0.6129208207130432,
0.9593162536621094... |
func (*MaintenanceManagerStatusPB_CompletedOpPB) Descriptor() ([]byte, []int) {
return file_yb_tablet_tablet_proto_rawDescGZIP(), []int{1, 1}
} | [
-0.06303652375936508,
-0.5420400500297546,
0.6077067255973816,
0.3551897704601288,
-0.791856050491333,
0.9744681119918823,
0.47009018063545227,
-0.25860723853111267,
-0.21936188638210297,
0.1958777755498886,
-0.3005526661872864,
-1.2057688236236572,
-0.1329643428325653,
0.6363021731376648,... |
func randomKey(n int) string {
rand.Seed(time.Now().UnixNano())
// Note that the letters i, l, and o are missing.
var letters = []rune("abcdefghjkmnpqrstuvwxyz0123456789")
key := make([]rune, n)
for i := range key {
key[i] = letters[rand.Intn(len(letters))]
}
return string(key)
} | [
-1.0027278661727905,
0.5690893530845642,
0.27822384238243103,
-0.8944209218025208,
0.2428056001663208,
0.143453910946846,
-0.4156869351863861,
-0.8653692603111267,
0.38300392031669617,
0.5696151852607727,
-0.7837310433387756,
0.12065891176462173,
-0.46085071563720703,
0.1207883358001709,
... |
func (c *connections) PutDevice(g *gin.Context) {
// deviceID has already been validated in Auth section, so the deviceID exists and
// is valid.
deviceID := g.Param("deviceID")
var dp DeviceProfile
err := g.Bind(&dp)
if err != nil {
g.IndentedJSON(http.StatusBadRequest,
ErrorResponse{
ErrorType: "Pa... | [
-0.9213905334472656,
0.7558775544166565,
0.5105584859848022,
0.1965475082397461,
0.379361629486084,
0.6536437273025513,
0.7688977122306824,
-0.6428004503250122,
0.020858798176050186,
0.217112198472023,
0.06239105015993118,
0.4025011658668518,
-0.6895524859428406,
0.5301778316497803,
1.23... |
func (c *connections) PutData(g *gin.Context) {
// deviceID has already been validated in Auth section, so the deviceID exists and
// is valid.
deviceID := g.Param("deviceID")
// Unmarshal and validate the payload.
var dd DeviceData
err := g.Bind(&dd)
if err != nil {
g.IndentedJSON(http.StatusBadRequest,
... | [
-1.0065762996673584,
0.6231546998023987,
0.543508768081665,
-0.05740964040160179,
0.32120630145072937,
0.9748222827911377,
0.39241844415664673,
-0.13698260486125946,
0.1956930309534073,
-0.2990822196006775,
0.6704233288764954,
0.82630455493927,
-0.31518813967704773,
0.6328511834144592,
1... |
func (c *connections) GetDevicesByUser(g *gin.Context) []string {
//username is already validated by Authorization step
username := g.Request.Header.Get("username")
devices, err := c.csndra.FindDevicesByUsername(username)
if err != nil {
g.IndentedJSON(http.StatusNotFound,
ErrorResponse{
ErrorType: "Da... | [
-0.571265697479248,
0.36812886595726013,
0.4796273410320282,
1.1828804016113281,
-0.1900244951248169,
0.10164236277341843,
1.0265768766403198,
-0.5913585424423218,
-0.2127864509820938,
0.3595198392868042,
0.04857690632343292,
0.3041491210460663,
-0.21334777772426605,
1.619570255279541,
0... |
func (c *connections) CreateDevice(g *gin.Context) {
// validate device
var dp DeviceProfile
err := g.Bind(&dp)
if err != nil {
g.IndentedJSON(http.StatusBadRequest,
ErrorResponse{
ErrorType: "PayloadDecodeError",
ErrorMessage: err.Error()})
return
}
// Validate description data.
if (dp.lat < ... | [
-0.6640675067901611,
0.717641294002533,
0.801719069480896,
0.2939958870410919,
0.7389495968818665,
0.7236220836639404,
-0.1936734914779663,
-0.2295994907617569,
-0.4671649932861328,
-0.2326442301273346,
0.16675375401973724,
-0.29384738206863403,
-0.1428031176328659,
0.7612348794937134,
1... |
func (c *connections) DeleteDevice(g *gin.Context) {
deviceID := g.Param("deviceID")
err := c.csndra.DeleteDevice(deviceID)
if err != nil {
log.WithFields(log.Fields{
"Error": err.Error(),
}).Error("Error deleting device")
g.IndentedJSON(http.StatusInternalServerError,
ErrorResponse{
ErrorType: ... | [
-0.5705413222312927,
0.37000343203544617,
0.6006238460540771,
0.6909201741218567,
0.6498367786407471,
0.6850874423980713,
0.9868739247322083,
-0.2560213804244995,
0.2584597170352936,
-0.4518652856349945,
1.0659974813461304,
0.8348074555397034,
-0.46263644099235535,
1.3299816846847534,
0.... |
func (l *Locker) Lock() {
for {
if l.locker == 0 && atomic.CompareAndSwapInt32(&l.locker, 0, -1) {
return
} else {
runtime.Gosched()
}
}
} | [
-0.672803521156311,
1.2634360790252686,
0.4754961431026459,
0.68453449010849,
0.7214222550392151,
0.9802552461624146,
0.671143651008606,
-0.716286838054657,
-0.14987418055534363,
-1.1037622690200806,
0.0743880346417427,
-0.16955126821994781,
-0.7425861358642578,
0.7249753475189209,
0.325... |
func (l *Locker) Unlock() {
if l.locker != -1 {
panic("db: Unlock of unlocked Locker")
}
atomic.StoreInt32(&l.locker, 0)
} | [
-0.2933441996574402,
1.6333608627319336,
0.3329964876174927,
0.5427696108818054,
-0.03831095993518829,
0.8381911516189575,
0.9248113632202148,
0.02340083010494709,
-0.27243831753730774,
-0.020448466762900352,
-0.5320366024971008,
-0.028904659673571587,
-0.6779419779777527,
-0.0699317902326... |
func AnnotationPath(resultID string, path string, op string) ([]byte, error) {
patches := []jsonpatch.JsonPatchOperation{{
Operation: op,
Path: path,
Value: resultID,
}}
return json.Marshal(patches)
} | [
-0.4839693307876587,
-0.7827169895172119,
0.15358537435531616,
0.4100012183189392,
-1.4009867906570435,
0.3219246566295624,
0.6882577538490295,
-0.7645444273948669,
0.5831040143966675,
1.1047028303146362,
-0.5038684606552124,
-0.3265134394168854,
-0.21279267966747284,
-0.17523890733718872,... |
func getLineRanges(src image.Image,
threshold uint32,
emptyLineThreshold float64) []lineRange {
bounds := src.Bounds()
srcWidth, srcHeight := bounds.Dx(), bounds.Dy()
threshold16 := threshold * 256
var ranges []lineRange
var r lineRange
maxDotCount := int(emptyLineThreshold)
if emptyLineThreshold < 1 {
max... | [
-0.0886324793100357,
-0.5563541054725647,
0.8294470906257629,
-0.31651484966278076,
0.3808945417404175,
-0.2731108069419861,
-0.48779991269111633,
0.19784682989120483,
0.19171710312366486,
-0.7353246212005615,
-0.5632128119468689,
0.23959524929523468,
0.19484446942806244,
1.133510708808899... |
func ChangeLineSpace(
src image.Image,
option ChangeLineSpaceOption) image.Image {
ranges := getLineRanges(src, option.threshold, option.emptyLineThreshold)
width := src.Bounds().Dx()
targetHeight := processLineRanges(ranges, width, option)
dest := image.NewRGBA(image.Rect(0, 0, width, targetHeight))
destY :=... | [
-0.6307962536811829,
-0.2907077372074127,
0.9010999202728271,
-0.5634956955909729,
-0.0021363631822168827,
-0.1904553472995758,
-0.12509767711162567,
-0.21584519743919373,
0.6212295293807983,
-0.14925114810466766,
-0.058591198176145554,
0.9496859312057495,
0.24163660407066345,
0.6783441901... |
func (r *AWSECSTaskDefinition_Ulimit) AWSCloudFormationType() string {
return "AWS::ECS::TaskDefinition.Ulimit"
} | [
0.9101590514183044,
1.3811123371124268,
0.5245460271835327,
0.5880314111709595,
-0.003815090050920844,
0.4882049560546875,
-0.15312573313713074,
0.6703206896781921,
0.5608982443809509,
-0.041464678943157196,
-0.2603779435157776,
0.37463557720184326,
0.8947996497154236,
0.12078282237052917,... |
func Avatar(w http.ResponseWriter, r *http.Request) {
initials := mux.Vars(r)["initials"]
colorHex := r.URL.Query().Get("color")
var color *avatar.Color
var err error
//create color for the avatar
if colorHex == "" {
color = avatar.RandomColor()
} else {
color, err = avatar.ColorFromHex(colorHex)
if err !... | [
-0.6753444671630859,
0.42590853571891785,
0.8707302808761597,
-0.12548889219760895,
-0.5127015113830566,
0.15182797610759735,
-0.052200574427843094,
-0.014797794632613659,
-0.03179308399558067,
0.4454687833786011,
0.9222060441970825,
0.006554060615599155,
0.7634433507919312,
0.107671193778... |
func totalNQueens(n int) int {
// 1. 常规dfs 回溯
//if n < 2 {
// return n
//}
//
//cols := make([]bool, n) // 记录皇后放置列数
//majority := make([]bool, 2*n - 1) // 主
//secondary := make([]bool, 2*n - 1) // 次
//
//count := 0
//dfsQueens(n, 0, &count, cols, majority, secondary)
//return count
// 2 结合位运算
if n < 2 {
... | [
-0.5856325030326843,
0.6011025905609131,
0.7189743518829346,
-0.3548417389392853,
0.4941144287586212,
-0.5468664765357971,
0.9900908470153809,
-0.5393298864364624,
-0.20397986471652985,
0.5980139374732971,
-1.4013924598693848,
0.16910120844841003,
0.04237287864089012,
-0.3321682810783386,
... |
func PlayGoTacToe() {
go Hub.run()
go Mh.handle()
votes := make(map[Coord]int)
decisionTimer := time.After(decisionInterval)
for {
select {
case input := <-VoteInput:
var vote voteMsg
err := json.Unmarshal(input, &vote)
if err != nil {
// Invalid vote data, who cares
continue
}
log.Print... | [
0.49440887570381165,
-0.29209211468696594,
0.7910197973251343,
-0.4240783154964447,
0.5787271857261658,
0.3949388265609741,
0.10961992293596268,
-0.007589665241539478,
-0.15026232600212097,
0.2404947280883789,
0.40824639797210693,
-0.3533928096294403,
-0.06267538666725159,
-0.2266385108232... |
func (w quit) Changed(app gowid.IApp, widget gowid.IWidget, data ...interface{}) {
app.Quit()
} | [
0.11195952445268631,
-0.6750161647796631,
0.4463658928871155,
0.14965702593326569,
0.3476177752017975,
1.6022626161575317,
-0.552557647228241,
0.17185375094413757,
0.04242614284157753,
0.45181113481521606,
0.30813783407211304,
1.1030734777450562,
0.27143412828445435,
1.1869443655014038,
... |
func (w showCodeOk) Changed(app gowid.IApp, widget gowid.IWidget, data ...interface{}) {
var client wormhole.Client
// goroutine so I don't block ui goroutine
go func() {
ctx := context.Background()
msg, err := client.Receive(ctx, w.Args.Code)
reject := true
if err != nil {
app.Run(gowid.RunFunction(fun... | [
0.5068951845169067,
0.10453696548938751,
0.855217456817627,
-0.4756185710430145,
-0.3574284613132477,
0.7086188197135925,
0.8924146890640259,
-0.09734077006578445,
0.40117135643959045,
0.35423505306243896,
0.20417271554470062,
1.0825872421264648,
-0.031875383108854294,
1.6277971267700195,
... |
func (w savedAs) Changed(app gowid.IApp, widget gowid.IWidget, data ...interface{}) {
w.previous.Close(app)
w.doSavedAs(w.savedFilename, app)
} | [
-0.09882823377847672,
-0.9514174461364746,
0.34445104002952576,
0.12717187404632568,
0.3346017003059387,
1.2638287544250488,
0.13738493621349335,
0.8583758473396301,
0.18274874985218048,
0.001656184671446681,
-0.10825373977422714,
0.7412502765655518,
1.1617428064346313,
1.2717654705047607,... |
func NewProjectBulkUpdateRequest() *ProjectBulkUpdateRequest {
this := ProjectBulkUpdateRequest{}
return &this
} | [
-1.7171976566314697,
0.06168678030371666,
0.30256199836730957,
1.165070652961731,
-0.9892370104789734,
-0.33842432498931885,
-0.1486157923936844,
0.1295258104801178,
-0.37567657232284546,
-0.02413993701338768,
-0.6007581949234009,
0.26009148359298706,
-0.25206953287124634,
-0.0117301763966... |
func NewProjectBulkUpdateRequestWithDefaults() *ProjectBulkUpdateRequest {
this := ProjectBulkUpdateRequest{}
return &this
} | [
-1.3193345069885254,
0.29343968629837036,
0.22293299436569214,
0.926303505897522,
-0.0752863734960556,
-0.21148015558719635,
-0.6762341260910034,
-0.05957140028476715,
-0.4939446449279785,
-0.6391436457633972,
-0.6236015558242798,
-0.7498085498809814,
-0.5012455582618713,
0.087306022644042... |
func (o *ProjectBulkUpdateRequest) GetCustomfieldProjects() []ProjectEditCustomFieldProject {
if o == nil || o.CustomfieldProjects == nil {
var ret []ProjectEditCustomFieldProject
return ret
}
return *o.CustomfieldProjects
} | [
-0.14596818387508392,
0.4784475564956665,
-0.0668550431728363,
0.12869328260421753,
-0.038714177906513214,
-0.04571778327226639,
0.5898513197898865,
-0.19499988853931427,
0.3632664978504181,
-0.2472650557756424,
-0.6104426383972168,
-0.7731273174285889,
-1.80030357837677,
0.195462942123413... |
func (o *ProjectBulkUpdateRequest) GetCustomfieldProjectsOk() (*[]ProjectEditCustomFieldProject, bool) {
if o == nil || o.CustomfieldProjects == nil {
return nil, false
}
return o.CustomfieldProjects, true
} | [
-0.008341444656252861,
1.1961129903793335,
0.20411881804466248,
0.2794973850250244,
-0.22789151966571808,
-0.03994353488087654,
0.4667530953884125,
0.10680290311574936,
0.17641326785087585,
0.3713932931423187,
-1.1545517444610596,
-0.4675602316856384,
-0.7205852270126343,
-0.12301701307296... |
func (o *ProjectBulkUpdateRequest) HasCustomfieldProjects() bool {
if o != nil && o.CustomfieldProjects != nil {
return true
}
return false
} | [
0.10707919299602509,
0.4435001611709595,
-0.18977682292461395,
-0.5891528129577637,
0.24754080176353455,
-0.12931756675243378,
0.2690465450286865,
0.08512205630540848,
-0.23461705446243286,
-0.2156262993812561,
-1.160258173942566,
-0.5980578660964966,
-1.146833896636963,
0.5423946380615234... |
func (o *ProjectBulkUpdateRequest) SetCustomfieldProjects(v []ProjectEditCustomFieldProject) {
o.CustomfieldProjects = &v
} | [
-0.5593587160110474,
0.38186997175216675,
-0.19452889263629913,
-0.1902504861354828,
0.17583149671554565,
0.5497906804084778,
0.21988600492477417,
-0.66413414478302,
-0.0214790441095829,
0.30124273896217346,
-0.4019545614719391,
0.35725152492523193,
-1.2856838703155518,
-0.7330384850502014... |
func NewJiraIssue(from jira.Issue) (JiraIssue, error) {
// Parse assignee
assnKey := ""
var assn *JiraUser = nil
if from.Fields.Assignee != nil {
assnKey = from.Fields.Assignee.Key
user := NewJiraUser(*from.Fields.Assignee)
assn = &user
}
// Parse resolution
res := ""
if from.Fields.Resolution != nil {... | [
-0.6001354455947876,
-0.9151426553726196,
0.5592658519744873,
-0.34346407651901245,
-1.3671975135803223,
-0.34998559951782227,
-0.1759514957666397,
-0.13375256955623627,
-0.23591983318328857,
0.45229873061180115,
0.13257260620594025,
-0.4972844123840332,
-0.33158451318740845,
-0.0482417456... |
func (l *Log) FirstIndex() uint64 {
if len(l.entries) != 0 {
return l.entries[0].Index
} else if l.pendingSnapshot != nil {
return l.pendingSnapshot.Metadata.Index
}
return l.snapIndex
} | [
0.13571341335773468,
-0.35909852385520935,
0.2712542414665222,
-0.2962031364440918,
-0.11613349616527557,
-0.3881200850009918,
-0.11948773264884949,
0.8956279158592224,
0.8395313620567322,
-0.812148928642273,
0.39578571915626526,
-0.01409651804715395,
0.3151875436306,
0.9464207887649536,
... |
func (l *Log) LastTerm() uint64 {
t, err := l.Term(l.LastIndex())
if err != nil {
panicf("unexpected error when getting the last term (%v)", err)
}
return t
} | [
0.11904838681221008,
0.463024765253067,
0.4452815651893616,
-0.10087140649557114,
0.33272507786750793,
-0.41224145889282227,
-0.24663019180297852,
0.1477319896221161,
0.7453702092170715,
-0.10738097876310349,
-0.07260559499263763,
-0.6119032502174377,
-0.9335159659385681,
-0.65620291233062... |
func (l *Log) Term(idx uint64) (uint64, error) {
if idx == l.snapIndex {
return l.snapTerm, nil
} else if len(l.entries) == 0 || idx < l.offset {
return 0, errCompacted
} else if idx > l.offset+uint64(len(l.entries))-1 {
return 0, errUnavailable
}
return l.entries[idx-l.offset].Term, nil
} | [
-0.8525782227516174,
-0.05007001757621765,
0.583381712436676,
-0.38739848136901855,
-0.9155188798904419,
0.035759247839450836,
-0.19502834975719452,
-0.34533044695854187,
1.085341215133667,
-0.4771728217601776,
-0.21324852108955383,
0.33556756377220154,
-0.24881672859191895,
-0.31634980440... |
func (l *Log) MatchTerm(idx, term uint64) bool {
idxt, err := l.Term(idx)
return err == nil && idxt == term
} | [
-0.21704170107841492,
-0.5239450335502625,
0.5330125689506531,
0.0069826822727918625,
-0.523590087890625,
-0.19668981432914734,
-1.7965869903564453,
-0.43755799531936646,
0.7889239192008972,
-0.15770186483860016,
-0.04189744219183922,
0.26865747570991516,
-0.3556244969367981,
-0.6391307711... |
func (l *Log) matchTermWithInf(idx, term uint64) (uint64, bool, error) {
idxt, err := l.Term(idx)
return idxt, err == nil && idxt == term, err
} | [
0.3476898968219757,
-1.1132838726043701,
0.5490221381187439,
0.0875958576798439,
-0.782730758190155,
-0.552764356136322,
-1.68478524684906,
-0.5416170358657837,
0.16547009348869324,
0.12397626042366028,
-0.5910080671310425,
-0.04418543353676796,
-0.6676260828971863,
-0.20935724675655365,
... |
func (l *Log) Slice(lo, hi uint64) ([]pb.Entry, error) {
if err := l.mustCheckOutOfBounds(lo, hi); err != nil || len(l.entries) == 0 {
return nil, err
}
return l.entries[lo-l.offset : hi-l.offset], nil
} | [
0.2079387605190277,
-0.5369783043861389,
0.5448383092880249,
0.8668315410614014,
0.18889346718788147,
0.354013055562973,
-0.923066258430481,
-0.1709858924150467,
-0.6356099247932434,
0.24196462333202362,
0.20211869478225708,
1.1914000511169434,
-0.3849131166934967,
0.022456271573901176,
... |
func (l *Log) HasSliceNotApplied() bool {
return l.hasSliceSince(l.applied)
} | [
0.8294274806976318,
-0.023532936349511147,
0.33141106367111206,
-0.6708956956863403,
-0.4674707055091858,
-0.09977351129055023,
-0.6753398180007935,
0.8475309610366821,
0.0000727375372662209,
-0.3816348612308502,
0.044570550322532654,
0.6003760099411011,
-0.053848057985305786,
2.0030410289... |
func (l *Log) SliceNotApplied() (ents []pb.Entry) {
return l.sliceSince(l.applied)
} | [
0.6365142464637756,
-1.0216748714447021,
0.27807238698005676,
0.12460054457187653,
-0.4097073972225189,
0.5353192090988159,
-0.7398202419281006,
0.23775869607925415,
0.385149747133255,
-0.09866274148225784,
0.10306622087955475,
0.6409728527069092,
-0.07907722145318985,
1.1379868984222412,
... |
func (l *Log) UnstableEntries() []pb.Entry {
if int(l.stabled+1-l.offset) > len(l.entries) {
return nil
}
return l.entries[l.stabled+1-l.offset:]
} | [
0.4852229058742523,
-0.5468374490737915,
0.6144156455993652,
0.34455862641334534,
0.09606108069419861,
0.5268915295600891,
-0.27090442180633545,
-0.2038220763206482,
0.05988769978284836,
-0.4720044732093811,
-0.2441910207271576,
0.12309378385543823,
-0.9453155994415283,
0.7063945531845093,... |
func (l *Log) Entries(idx uint64) ([]pb.Entry, error) {
if idx < l.FirstIndex() {
return nil, errCompacted
} else if idx > l.LastIndex() {
return nil, nil
}
return l.entries[idx-l.offset:], nil
} | [
-0.4197430908679962,
0.2860528528690338,
0.4011705219745636,
-0.48839646577835083,
0.4711129665374756,
0.0914774164557457,
-0.2875335216522217,
-0.6225302219390869,
0.5237260460853577,
-0.6522157192230225,
-0.10878224670886993,
0.5645076036453247,
-0.5625692009925842,
0.09115482121706009,
... |
func (l *Log) CommitTo(tocommit uint64) {
if l.committed < tocommit {
if l.LastIndex() < tocommit {
panicf("tocommit(%d) is out of range [lastIndex(%d)]. Was the raft log corrupted, truncated, or lost?", tocommit, l.LastIndex())
}
l.committed = tocommit
}
} | [
0.05453212931752205,
0.36648181080818176,
0.7539065480232239,
-0.9145209789276123,
0.5170272588729858,
0.2693248689174652,
0.7584503293037415,
-0.6142737865447998,
-0.7975245714187622,
0.8232470750808716,
-0.3109017312526703,
0.6287947297096252,
-0.2781304121017456,
-0.08848664909601212,
... |
func DHTOfferQueryHandler(reader fcrserver.FCRServerRequestReader, writer fcrserver.FCRServerResponseWriter, request *fcrmessages.FCRReqMsg) error {
logging.Debug("Handle dht offer query")
// Get core structure
c := core.GetSingleInstance()
c.MsgSigningKeyLock.RLock()
defer c.MsgSigningKeyLock.RUnlock()
// Messa... | [
-0.03140440955758095,
0.4028496742248535,
0.8340743184089661,
-0.07950752973556519,
-0.2512202858924866,
-0.16265366971492767,
0.9505775570869446,
-0.9673722386360168,
-0.03452123701572418,
0.29368579387664795,
0.8884373903274536,
-0.1896996796131134,
-0.9635800123214722,
1.096847772598266... |
func NewFileSystemCache(path string) *FileSystemCache {
return &FileSystemCache{
path: path,
}
} | [
-0.2618910074234009,
-1.026284098625183,
0.031268324702978134,
0.9304412603378296,
-1.3157880306243896,
-0.8691223859786987,
-0.40686488151550293,
-0.14804236590862274,
0.27368029952049255,
-0.5572822690010071,
-0.5402329564094543,
-0.6791227459907532,
-0.0766453891992569,
0.43127092719078... |
func (c *FileSystemCache) Prefix(p ...string) Cache {
c.prefix = p
return c
} | [
-0.40345314145088196,
0.6425169706344604,
0.18034446239471436,
0.7643831372261047,
0.10330010205507278,
0.5622783303260803,
-0.31118106842041016,
0.17332294583320618,
0.7840526103973389,
-0.2731803059577942,
-0.7104328870773315,
-0.1997223049402237,
0.22926461696624756,
0.6502068638801575,... |
func (c *FileSystemCache) Clone() Cache {
return &FileSystemCache{
path: path.Join(append([]string{c.path}, c.prefix...)...),
prefix: []string{},
}
} | [
0.32692936062812805,
-0.9120975732803345,
0.45791926980018616,
0.6757429838180542,
-1.027083158493042,
0.19896426796913147,
-0.45127761363983154,
-0.376681387424469,
0.48291778564453125,
-0.20868763327598572,
0.1439024806022644,
-0.1888168752193451,
-0.0998866930603981,
-0.6112277507781982... |
func (c *FileSystemCache) Set(data []byte, expire time.Duration, key ...string) error {
if len(key) < 1 {
return fmt.Errorf("no key specified")
}
folder := c.keyPath(key[:len(key)-1]...)
_, err := os.Stat(folder)
if os.IsNotExist(err) {
os.MkdirAll(folder, 0700)
}
if expire > 0 {
expireTS := time.Now().Add... | [
-0.9583170413970947,
0.27600976824760437,
0.7777372002601624,
-0.14552965760231018,
0.3184415102005005,
0.15093638002872467,
-0.43269824981689453,
-0.08201637119054794,
-0.47840946912765503,
0.20177526772022247,
-0.37304162979125977,
-0.4475133717060089,
-0.014820787124335766,
0.9055872559... |
func (c *FileSystemCache) Get(key ...string) ([]byte, error) {
if len(key) < 1 {
return nil, fmt.Errorf("no key specified")
}
_, err := os.Stat(c.expirePath(key...))
if !os.IsNotExist(err) {
d, err := ioutil.ReadFile(c.expirePath(key...))
if err != nil {
return nil, fmt.Errorf("failed to get expiration tim... | [
-0.9876477122306824,
-0.23906341195106506,
0.9082006216049194,
0.09634523838758469,
0.5684773325920105,
-0.2874191999435425,
-0.9754241704940796,
-0.10690374672412872,
-0.9228613376617432,
0.4736712872982025,
0.3959590494632721,
-0.137586310505867,
0.05063781142234802,
0.37920159101486206,... |
func (c *FileSystemCache) SetJSON(o interface{}, expire time.Duration, key ...string) error {
b, err := json.Marshal(o)
if err != nil {
return err
}
return c.Set(b, expire, key...)
} | [
-1.347224473953247,
0.22920571267604828,
0.532714307308197,
0.4674511253833771,
-0.45481884479522705,
-0.31261250376701355,
-0.30373838543891907,
0.06492623686790466,
0.0256193857640028,
0.416836678981781,
-1.335062026977539,
0.47114893794059753,
0.39937952160835266,
0.5883334279060364,
... |
func (c *FileSystemCache) GetJSON(o interface{}, key ...string) error {
b, err := c.Get(key...)
if err != nil {
return err
}
return json.Unmarshal(b, o)
} | [
-1.0718694925308228,
0.35499709844589233,
0.5627070665359497,
0.5411474704742432,
-0.47598665952682495,
-0.7966133952140808,
-0.036275994032621384,
-0.23495735228061676,
-0.35210636258125305,
-0.01808900758624077,
-0.21629270911216736,
0.4750358462333679,
0.1849481612443924,
-0.13858069479... |
func ExtractSubtraces(t pb.Trace, root *pb.Span) []Subtrace {
if root == nil {
return []Subtrace{}
}
childrenMap := traceutil.ChildrenMap(t)
subtraces := []Subtrace{}
visited := make(map[*pb.Span]bool, len(t))
subtracesMap := make(map[*pb.Span][]*pb.Span)
var next stack
next.Push(&spanAndAncestors{root, []*p... | [
0.9753826260566711,
0.5937700867652893,
1.017595887184143,
-0.12817665934562683,
-0.6508265733718872,
0.054597631096839905,
0.3739786446094513,
-0.7999387383460999,
1.0590503215789795,
-0.013618630357086658,
-0.2782427966594696,
-0.049785465002059937,
-0.23473426699638367,
0.90444022417068... |
func serveHome() http.Handler {
fn := func(w http.ResponseWriter, r *http.Request) {
buf := new (bytes.Buffer)
drawHome(buf)
w.Write(buf.Bytes())
}
return http.HandlerFunc(fn)
} | [
0.5580511093139648,
0.09840496629476547,
0.5440292954444885,
0.05876598879694939,
-0.2767472565174103,
0.17995847761631012,
0.8651637434959412,
-0.5393097400665283,
0.10060974955558777,
-0.06732986122369766,
-0.26334065198898315,
0.4618953466415405,
-0.9092682003974915,
-0.6261626482009888... |
func NewDomainAttachment(ctx *pulumi.Context,
name string, args *DomainAttachmentArgs, opts ...pulumi.ResourceOption) (*DomainAttachment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DomainNames == nil {
return nil, errors.New("invalid value for required ... | [
-0.8885124325752258,
0.5714800953865051,
0.4323968291282654,
0.09071726351976395,
-0.5182605981826782,
1.048033356666565,
-0.03266661986708641,
0.0843256264925003,
0.31720858812332153,
-0.310208797454834,
-0.5722824931144714,
0.620428204536438,
-0.021859006956219673,
0.4540950357913971,
... |
func GetDomainAttachment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DomainAttachmentState, opts ...pulumi.ResourceOption) (*DomainAttachment, error) {
var resource DomainAttachment
err := ctx.ReadResource("alicloud:dns/domainAttachment:DomainAttachment", name, id, state, &resource, opts...)
if err ... | [
-0.3950144052505493,
-0.010917731560766697,
0.2816533148288727,
0.3867356777191162,
-0.5864167213439941,
0.44862085580825806,
-0.3424513339996338,
-0.6062129735946655,
1.2393696308135986,
-0.5819698572158813,
0.24442632496356964,
1.6869534254074097,
0.43871453404426575,
-0.5226799249649048... |
func (o DomainAttachmentOutput) DomainNames() pulumi.StringArrayOutput {
return o.ApplyT(func(v *DomainAttachment) pulumi.StringArrayOutput { return v.DomainNames }).(pulumi.StringArrayOutput)
} | [
-0.582165002822876,
-0.13775326311588287,
0.40068358182907104,
0.12425191700458527,
0.26023268699645996,
0.8745514750480652,
-0.3853358030319214,
-0.34244924783706665,
1.0486356019973755,
-0.829109787940979,
-0.7826719880104065,
1.635841727256775,
1.1972270011901855,
-0.2681325674057007,
... |
func (o DomainAttachmentOutput) InstanceId() pulumi.StringOutput {
return o.ApplyT(func(v *DomainAttachment) pulumi.StringOutput { return v.InstanceId }).(pulumi.StringOutput)
} | [
0.4105775058269501,
-0.6479167342185974,
0.42044609785079956,
-0.6033937931060791,
-0.7101317644119263,
1.7637933492660522,
0.4416888356208801,
0.35916757583618164,
0.7418750524520874,
-0.2529323995113373,
0.8082888126373291,
1.6167747974395752,
-0.06870841234922409,
-0.6273530125617981,
... |
func (m Trace) Validate(formats strfmt.Registry) error {
var res []error
for i := 0; i < len(m); i++ {
if m[i] != nil {
if err := m[i].Validate(formats); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | [
0.23248393833637238,
0.4803159832954407,
0.47230157256126404,
0.13653045892715454,
1.310692548751831,
0.09884230047464371,
0.5131880044937134,
-1.0513134002685547,
-0.32867273688316345,
0.25340092182159424,
0.39761900901794434,
-0.8134980797767639,
-0.6870118379592896,
1.1711294651031494,
... |
func NewRegistrationResultPayload(rkID, deregStatus, rtCtx *Param) *RegistrationResultPayload {
return &RegistrationResultPayload{
LocalRoutingKeyIdentifier: rkID,
RegistrationStatus: deregStatus,
RoutingContext: rtCtx,
}
} | [
-0.6384917497634888,
0.07997404783964157,
0.01539663877338171,
0.18441259860992432,
-0.5354446768760681,
-0.6418951749801636,
-0.20725436508655548,
-0.41644811630249023,
0.28307464718818665,
0.4224044978618622,
-0.9541749954223633,
-0.2875685393810272,
-0.8729009032249451,
-0.2085597962141... |
func NewRegistrationResult(rr *RegistrationResultPayload) *Param {
return newNestedParam(
RegistrationResult,
rr.LocalRoutingKeyIdentifier,
rr.RegistrationStatus,
rr.RoutingContext,
)
} | [
-0.2716202437877655,
0.48951947689056396,
0.06987153738737106,
0.081429123878479,
-0.708337664604187,
-0.9933192133903503,
-0.17176279425621033,
-0.15677200257778168,
0.06198177859187126,
0.5439667701721191,
-0.9796464443206787,
-0.25036898255348206,
-0.05452437326312065,
0.174169272184371... |
func ParseRegistrationResultPayload(b []byte) (*RegistrationResultPayload, error) {
d := &RegistrationResultPayload{}
if err := d.UnmarshalBinary(b); err != nil {
return nil, err
}
return d, nil
} | [
-0.737517237663269,
0.7728016376495361,
-0.1320309191942215,
0.00508240656927228,
-0.807598352432251,
-0.7239419221878052,
0.688493013381958,
-0.6897073984146118,
0.4020354449748993,
0.48601865768432617,
-0.9653506278991699,
-0.5569821000099182,
-0.8099852204322815,
-0.25359755754470825,
... |
func (d *RegistrationResultPayload) UnmarshalBinary(b []byte) error {
ps, err := ParseMultiParams(b)
if err != nil {
return err
}
if len(ps) != 3 {
return ErrInvalidLength
}
d.LocalRoutingKeyIdentifier = ps[0]
d.RegistrationStatus = ps[1]
d.RoutingContext = ps[2]
return nil
} | [
-0.48196297883987427,
0.6402732133865356,
0.6357148885726929,
-0.4604972004890442,
-0.03300175443291664,
-1.0206598043441772,
-0.043287236243486404,
-0.09702334553003311,
-0.2727225124835968,
0.8913928866386414,
-0.8070918917655945,
-0.19468161463737488,
-0.4949544370174408,
-0.07532176375... |
func DecodeRegistrationResultPayload(b []byte) (*RegistrationResultPayload, error) {
log.Println("DEPRECATED: use ParseRegistrationResultPayload instead")
return ParseRegistrationResultPayload(b)
} | [
-0.7795677781105042,
0.3640756905078888,
0.19924983382225037,
0.11351212859153748,
-0.9863106608390808,
-1.3369970321655273,
0.0432012565433979,
-0.2162161022424698,
0.04707803577184677,
-0.06877021491527557,
-1.2097336053848267,
-0.586451530456543,
-0.8128151893615723,
-0.3545556366443634... |
func (d *RegistrationResultPayload) DecodeFromBytes(b []byte) error {
log.Println("DEPRECATED: use UnmarshalBinary instead")
return d.UnmarshalBinary(b)
} | [
-0.19318638741970062,
0.157652348279953,
0.2976890802383423,
0.04726598784327507,
-0.4177457392215729,
-0.597822368144989,
-0.5938118100166321,
0.05813754349946976,
0.5811370611190796,
-0.36354684829711914,
-0.3955404460430145,
-0.7121143937110901,
-0.46825501322746277,
0.22231212258338928... |
func (proxier *Proxier) OnServiceAdd(service *api.Service) {
namespacedName := types.NamespacedName{Namespace: service.Namespace, Name: service.Name}
if proxier.serviceChanges.Update(&namespacedName, nil, service) && proxier.isInitialized() {
// proxier.syncRunner.Run()
proxier.syncProxyRules()
}
} | [
0.6742302179336548,
-1.026850938796997,
0.5156734585762024,
-0.7000090479850769,
-0.524472177028656,
0.15678538382053375,
-1.1776678562164307,
-0.5555592179298401,
1.3783903121948242,
-0.3466355800628662,
-0.10129515081644058,
0.8626993894577026,
0.32942643761634827,
1.215354323387146,
0... |
func (proxier *Proxier) OnServiceUpdate(oldService, service *api.Service) {
namespacedName := types.NamespacedName{Namespace: service.Namespace, Name: service.Name}
if proxier.serviceChanges.Update(&namespacedName, oldService, service) && proxier.isInitialized() {
// proxier.syncRunner.Run()
proxier.syncProxyRules... | [
-0.16258570551872253,
-1.0382245779037476,
0.48548024892807007,
-0.7324178218841553,
-0.8528990745544434,
-0.4894021153450012,
-1.0889112949371338,
-0.13759703934192657,
0.9193451404571533,
0.306856632232666,
-0.06014126166701317,
0.3882443904876709,
-0.27316856384277344,
0.914833545684814... |
func (proxier *Proxier) OnServiceDelete(service *api.Service) {
namespacedName := types.NamespacedName{Namespace: service.Namespace, Name: service.Name}
if proxier.serviceChanges.Update(&namespacedName, service, nil) && proxier.isInitialized() {
// proxier.syncRunner.Run()
proxier.syncProxyRules()
}
} | [
0.9088315963745117,
-0.9984952211380005,
0.5246317386627197,
-0.7324135303497314,
-0.3145897090435028,
-0.5929725170135498,
-1.19312584400177,
-0.3334713578224182,
1.3270514011383057,
0.05098841339349747,
-0.1705123633146286,
0.34781327843666077,
-0.36673209071159363,
0.8300183415412903,
... |
func (proxier *Proxier) OnServiceSynced() {
proxier.mu.Lock()
proxier.servicesSynced = true
proxier.setInitialized(proxier.servicesSynced && proxier.endpointsSynced)
proxier.mu.Unlock()
// Sync unconditionally - this is called once per lifetime.
proxier.syncProxyRules()
} | [
0.17741750180721283,
-0.254832923412323,
0.30809059739112854,
-0.29135921597480774,
0.07535522431135178,
-0.9726614952087402,
-0.5192915201187134,
-0.4273645877838135,
0.47159191966056824,
-0.03693041950464249,
-0.5909901857376099,
0.4642314016819,
0.6771782040596008,
0.5090159177780151,
... |
func (proxier *Proxier) OnEndpointsAdd(endpoints *api.Endpoints) {
namespacedName := types.NamespacedName{Namespace: endpoints.Namespace, Name: endpoints.Name}
if proxier.endpointsChanges.Update(&namespacedName, nil, endpoints) && proxier.isInitialized() {
// proxier.syncRunner.Run()
proxier.syncProxyRules()
}
} | [
-0.17947880923748016,
-0.6797802448272705,
0.6375827789306641,
-0.0481116808950901,
0.17229005694389343,
0.02502589486539364,
-0.6180416345596313,
0.08356834948062897,
1.2087688446044922,
0.7950762510299683,
0.10504323989152908,
-0.10164283961057663,
-0.048553794622421265,
0.70669859647750... |
func (proxier *Proxier) OnEndpointsUpdate(oldEndpoints, endpoints *api.Endpoints) {
namespacedName := types.NamespacedName{Namespace: endpoints.Namespace, Name: endpoints.Name}
if proxier.endpointsChanges.Update(&namespacedName, oldEndpoints, endpoints) && proxier.isInitialized() {
// proxier.syncRunner.Run()
prox... | [
-0.4134560525417328,
-1.1655441522598267,
0.5043500661849976,
-0.36567580699920654,
-0.3171806335449219,
-0.09089618176221848,
-0.8771710991859436,
-0.10215971618890762,
0.8724802732467651,
1.281654953956604,
0.1269064098596573,
-0.13962630927562714,
0.0774892121553421,
0.3538810610771179,... |
func (proxier *Proxier) OnEndpointsDelete(endpoints *api.Endpoints) {
namespacedName := types.NamespacedName{Namespace: endpoints.Namespace, Name: endpoints.Name}
if proxier.endpointsChanges.Update(&namespacedName, endpoints, nil) && proxier.isInitialized() {
// proxier.syncRunner.Run()
proxier.syncProxyRules()
}... | [
0.2085372805595398,
-0.8255211114883423,
0.49788492918014526,
-0.1754596084356308,
0.2909642457962036,
-0.13409048318862915,
-0.44666558504104614,
-0.0770455077290535,
1.1303783655166626,
1.1238572597503662,
0.4242710471153259,
-0.3084505796432495,
-0.1646537482738495,
0.18283036351203918,... |
func (proxier *Proxier) OnEndpointsSynced() {
proxier.mu.Lock()
proxier.endpointsSynced = true
proxier.mu.Unlock()
proxier.syncProxyRules()
} | [
0.09089741110801697,
-0.30025815963745117,
0.4650842547416687,
-0.1829497367143631,
0.44269925355911255,
-0.4787652790546417,
-0.15620262920856476,
0.2066456377506256,
0.3565676212310791,
0.7909200191497803,
-0.4374711513519287,
0.04611782729625702,
0.1614121049642563,
-0.18547138571739197... |
func (proxier *Proxier) deleteEndpointConnections(connectionMap map[util.EndpointServicePair]bool) {
for epSvcPair := range connectionMap {
if svcInfo, ok := proxier.serviceMap[epSvcPair.ServicePortName]; ok && svcInfo.Protocol == strings.ToLower(string(api.ProtocolUDP)) {
endpointIP := util.IPPart(epSvcPair.Endp... | [
-1.1487683057785034,
-0.08910996466875076,
0.7618786692619324,
0.16634732484817505,
0.4843924045562744,
0.1752215176820755,
0.20649853348731995,
0.2546359598636627,
-0.002566745039075613,
0.14001989364624023,
0.7622107863426208,
-1.1666395664215088,
-1.1380070447921753,
-0.1510283201932907... |
func (proxier *Proxier) CheckUnusedRule (activeServiceMap map[activeServiceKey]bool, activeBindIP map[string]int, dummylink netlink.Link){
// check unused ipvs rules
oldSvcs, err := proxier.ipvsInterface.ListIpvsService()
if err != nil{
glog.Errorf("CheckUnusedRule: failed to list ipvs service: %v", err)
return
... | [
-0.709112823009491,
-0.5929903984069824,
0.8524109125137329,
-1.0270955562591553,
0.40697118639945984,
-0.14453937113285065,
0.8682183027267456,
-0.1683567613363266,
-0.25869813561439514,
0.285420686006546,
0.7000531554222107,
0.2857796847820282,
-0.7474697828292847,
0.8299388289451599,
... |
func (*CreateWithdrawRequest) Descriptor() ([]byte, []int) {
return file_services_temporal_service_proto_rawDescGZIP(), []int{0}
} | [
-0.38093963265419006,
0.13170413672924042,
0.541270911693573,
-0.3450309932231903,
0.377278596162796,
0.30997028946876526,
0.189844012260437,
-1.1200898885726929,
-0.6906707286834717,
-0.4946724474430084,
-0.5346105694770813,
-0.09617068618535995,
0.5648345947265625,
1.4652248620986938,
... |
func (*GetWithdrawalRequest) Descriptor() ([]byte, []int) {
return file_services_temporal_service_proto_rawDescGZIP(), []int{1}
} | [
-0.28601276874542236,
0.08485694229602814,
0.6437329649925232,
-0.07083004713058472,
-0.18423911929130554,
-0.25030454993247986,
-0.19251032173633575,
-0.04603826254606247,
-0.1315709501504898,
-0.6517834067344666,
0.005363675765693188,
0.6988978981971741,
0.7599775195121765,
0.88776415586... |
func (*QueryWithdrawal) Descriptor() ([]byte, []int) {
return file_services_temporal_service_proto_rawDescGZIP(), []int{2}
} | [
0.0005026892176829278,
0.2700243890285492,
0.22885914146900177,
-0.6405203342437744,
-0.609822154045105,
0.04024418443441391,
-0.543101966381073,
-1.1258680820465088,
0.36701539158821106,
-1.090211272239685,
0.5152765512466431,
0.6464473009109497,
0.7403716444969177,
0.3584553003311157,
... |
func (*QueryWithdrawal2) Descriptor() ([]byte, []int) {
return file_services_temporal_service_proto_rawDescGZIP(), []int{3}
} | [
0.18147897720336914,
-0.3181883990764618,
0.0594133585691452,
-0.5212581753730774,
-0.8766795992851257,
-0.2429599165916443,
-1.1445587873458862,
-1.15871000289917,
0.03959387168288231,
-0.9158435463905334,
0.34290939569473267,
0.7010002136230469,
0.7689700722694397,
0.8919934630393982,
... |
func (*UpdateWithdrawRequest) Descriptor() ([]byte, []int) {
return file_services_temporal_service_proto_rawDescGZIP(), []int{4}
} | [
-0.7268714308738708,
-0.024768151342868805,
0.6169909238815308,
-1.14789617061615,
-0.7294719815254211,
-0.26775380969047546,
0.2010805457830429,
-0.5826700925827026,
-0.09119091182947159,
-0.20290517807006836,
-0.29271796345710754,
0.23132996261119843,
0.280102401971817,
0.450013667345047... |
func NewAggregator() *Aggregator {
return &Aggregator{
reporters: make(map[string]Reporter),
}
} | [
0.1360791027545929,
-0.401030957698822,
0.11296611279249191,
-0.867904543876648,
-1.3543096780776978,
-0.48938363790512085,
-0.5452786684036255,
0.22091934084892273,
-0.47745394706726074,
-1.1147949695587158,
0.13084325194358826,
0.014608773402869701,
-0.38540393114089966,
1.18948733806610... |
func (ag *Aggregator) Report(isSlaveType, shouldQueryServiceBeRunning bool) (time.Duration, error) {
var (
wg sync.WaitGroup
rec concurrency.AllErrorRecorder
)
results := make(chan time.Duration, len(ag.reporters))
ag.mu.Lock()
for name, rep := range ag.reporters {
wg.Add(1)
go func(name string, rep Repo... | [
-0.45793309807777405,
1.363740086555481,
0.8559908270835876,
0.215251624584198,
0.40311020612716675,
-0.1877780705690384,
0.5881674289703369,
0.25515642762184143,
-0.5012879967689514,
0.3137870132923126,
0.445450097322464,
-0.5759689807891846,
-1.1933454275131226,
0.985526442527771,
-0.1... |
func (ag *Aggregator) Register(name string, rep Reporter) {
ag.mu.Lock()
defer ag.mu.Unlock()
if _, ok := ag.reporters[name]; ok {
panic("reporter named " + name + " is already registered")
}
ag.reporters[name] = rep
} | [
-0.11135547608137131,
0.3777143359184265,
0.2741742730140686,
-0.4496716558933258,
0.29007816314697266,
-0.23165962100028992,
-1.140251636505127,
-0.13223285973072052,
-0.7328267693519592,
0.3084162771701813,
-0.752653181552887,
-0.11777279525995255,
-0.5724541544914246,
-0.270877957344055... |
func (ag *Aggregator) HTMLName() template.HTML {
ag.mu.Lock()
defer ag.mu.Unlock()
result := make([]string, 0, len(ag.reporters))
for _, rep := range ag.reporters {
result = append(result, string(rep.HTMLName()))
}
sort.Strings(result)
return template.HTML(strings.Join(result, " + "))
} | [
-0.03560657054185867,
0.5991732478141785,
0.6593734622001648,
-0.5507246851921082,
-0.993144690990448,
0.3425620198249817,
-0.5416802763938904,
0.6996062397956848,
-0.5342587232589722,
0.8811270594596863,
0.9954915046691895,
-0.6101799011230469,
0.4433261752128601,
0.44927456974983215,
-... |
func (c installReferrerHandler) CallbackWithString(s string) {
m := c.M().WithLogTag("IRL")
m.Debug("installReferrerHandler#CallbackWithString")
defer func() {
err := c.G().Env.GetConfigWriter().SetAndroidInstallReferrerChecked(true)
if err != nil {
m.Warning("Error in SetAndroidInstallReferrerChecked: %v", e... | [
0.6586933732032776,
-0.4909466803073883,
0.7159166932106018,
-0.16656704246997833,
-0.43028321862220764,
-0.14418824017047882,
0.07365762442350388,
-0.10758835077285767,
0.10487362742424011,
0.4967310130596161,
-0.049389179795980453,
0.21029579639434814,
-0.43743807077407837,
1.12225151062... |
func (_m *MockMapInterface) Add(_a0 collector.Interface) {
_m.Called(_a0)
} | [
-0.7794848680496216,
-0.8038386702537537,
0.3582255244255066,
-0.5905064344406128,
-0.05269724875688553,
0.5328345894813538,
1.242501974105835,
0.5921077728271484,
0.5565081238746643,
0.2835737466812134,
0.3258677124977112,
-0.10288503766059875,
0.39846527576446533,
1.1891545057296753,
1... |
func (_m *MockMapInterface) AddFlagsFrom(_a0 interface{}) {
_m.Called(_a0)
} | [
0.8268588185310364,
0.21902567148208618,
0.3272680342197418,
0.014811565168201923,
0.31809529662132263,
0.7937003374099731,
1.1867709159851074,
0.5095119476318359,
0.34253501892089844,
-0.6604840159416199,
0.29311540722846985,
-0.269871324300766,
0.25349146127700806,
1.2250025272369385,
... |
func (_m *MockMapInterface) EnableFlagNames() map[string]string {
ret := _m.Called()
var r0 map[string]string
if rf, ok := ret.Get(0).(func() map[string]string); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(map[string]string)
}
}
return r0
} | [
0.04778411611914635,
0.35883796215057373,
0.6392677426338196,
-0.2873155176639557,
-0.056575875729322433,
-0.044392965734004974,
0.3172394931316376,
0.6336870193481445,
-0.7297671437263489,
-0.18442337214946747,
-0.6534228324890137,
0.16922332346439362,
-0.8264760375022888,
0.9331051707267... |
func (_m *MockMapInterface) Flags() []cli.Flag {
ret := _m.Called()
var r0 []cli.Flag
if rf, ok := ret.Get(0).(func() []cli.Flag); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]cli.Flag)
}
}
return r0
} | [
-0.6073384881019592,
0.6068007946014404,
0.5245474576950073,
0.5409268736839294,
1.029000997543335,
0.18978814780712128,
0.7834102511405945,
0.3664642870426178,
-0.03795624151825905,
-0.7138793468475342,
0.14606796205043793,
0.41361749172210693,
-0.3796740472316742,
0.8056567311286926,
-... |
func (_m *MockMapInterface) Get(_a0 string) collector.Interface {
ret := _m.Called(_a0)
var r0 collector.Interface
if rf, ok := ret.Get(0).(func(string) collector.Interface); ok {
r0 = rf(_a0)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(collector.Interface)
}
}
return r0
} | [
-0.5170571804046631,
-0.9469869136810303,
0.39491069316864014,
-1.1519709825515747,
0.26432639360427856,
-0.94310462474823,
0.7359229326248169,
0.524992048740387,
-0.007645504083484411,
0.05804283916950226,
0.5881746411323547,
0.31810176372528076,
0.1378217488527298,
0.2768200933933258,
... |
func New() (*State, error) {
playerDB, err := db.Connect()
if err != nil {
return nil, errors.Wrap(err, "failed to connect to player db")
}
ec, err := engine_client.New()
if err != nil {
return nil, errors.Wrap(err, "failed to create engine client")
}
peerAddresses := strings.Split(*peers, ",")
if len(pe... | [
-0.37996742129325867,
-0.7634049654006958,
0.4313710629940033,
-1.019798994064331,
-0.29201072454452515,
-0.23214034736156464,
0.014879407361149788,
0.04627365991473198,
-0.5014269948005676,
0.8587400913238525,
0.3982146680355072,
-0.19835662841796875,
-0.1450100839138031,
-0.0925098061561... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.