text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func NewMockWithLogger(logger Logger) MockClient {
testCluster := generateTestCluster()
testHost := generateTestHost(testCluster)
testStorageDomain := generateTestStorageDomain()
secondaryStorageDomain := generateTestStorageDomain()
testDatacenter := generateTestDatacenter(testCluster)
testNetwork := generateTest... | [
0.1390385627746582,
-0.20175236463546753,
0.49369433522224426,
-0.09436820447444916,
0.19045080244541168,
-0.5132359266281128,
1.0495960712432861,
-0.5104203224182129,
-0.07433519512414932,
-0.1294787973165512,
-0.22006136178970337,
0.14590825140476227,
-0.5563216805458069,
0.1648415774106... |
func (r UserPage) IsEmpty() (bool, error) {
users, err := ExtractUsers(r)
return len(users) == 0, err
} | [
-1.1211882829666138,
0.1354157030582428,
0.41335922479629517,
0.4412698447704315,
0.6254802346229553,
0.054425131529569626,
-0.12383383512496948,
0.26846805214881897,
0.337026983499527,
0.4536055028438568,
-0.2917337417602539,
-0.3239257335662842,
-0.7164945602416992,
0.30470991134643555,
... |
func (r UserPage) NextPageURL() (string, error) {
var s struct {
Links struct {
Next string `json:"next"`
Previous string `json:"previous"`
} `json:"links"`
}
err := r.ExtractInto(&s)
if err != nil {
return "", err
}
return s.Links.Next, err
} | [
-0.40059855580329895,
0.26299619674682617,
0.26326820254325867,
0.31383493542671204,
-0.8158458471298218,
-0.16336236894130707,
-0.2367338389158249,
-0.3557834029197693,
-0.2708260118961334,
0.14627787470817566,
0.5700691342353821,
-0.023713884875178337,
-0.6645417213439941,
0.293741077184... |
func ExtractUsers(r pagination.Page) ([]User, error) {
var s struct {
Users []User `json:"users"`
}
err := (r.(UserPage)).ExtractInto(&s)
return s.Users, err
} | [
-1.4056650400161743,
0.010723026469349861,
0.057635270059108734,
0.15316110849380493,
0.03884859383106232,
-0.6680727005004883,
-0.24535423517227173,
-0.11120623350143433,
0.25579485297203064,
0.8376448750495911,
-0.49706676602363586,
-0.15754979848861694,
-0.5426111221313477,
0.2488330453... |
func (r userResult) Extract() (*User, error) {
var s struct {
User *User `json:"user"`
}
err := r.ExtractInto(&s)
return s.User, err
} | [
-0.6691274642944336,
0.21634843945503235,
0.2802220284938812,
0.7461768984794617,
-1.2928638458251953,
-0.5354716777801514,
0.16835147142410278,
-0.7016979455947876,
0.1293676346540451,
-0.1433480978012085,
-0.9567040205001831,
-0.06448891013860703,
-0.5053870677947998,
-0.9704618453979492... |
func (r IsMemberOfGroupResult) Extract() (bool, error) {
return r.isMember, r.Err
} | [
-0.409620463848114,
-0.34765565395355225,
0.4100874066352844,
0.47049087285995483,
-1.0254453420639038,
-0.3563360869884491,
0.18857136368751526,
-0.3574504852294922,
-0.16228456795215607,
0.3425222337245941,
-0.27183806896209717,
0.06997103989124298,
-1.5510529279708862,
0.364167869091033... |
func (s *BaseBrainfuckListener) VisitTerminal(node antlr.TerminalNode) {} | [
-0.9966397285461426,
-0.11223261058330536,
0.40327969193458557,
-0.3588692843914032,
-0.05110900476574898,
0.3144921362400055,
0.8334037661552429,
0.07174056023359299,
-0.19996251165866852,
0.702190637588501,
0.07561123371124268,
1.265696406364441,
-0.13066168129444122,
0.7011236548423767,... |
func (s *BaseBrainfuckListener) EnterEveryRule(ctx antlr.ParserRuleContext) {} | [
0.13235414028167725,
0.29348644614219666,
0.25469815731048584,
-0.22166743874549866,
1.2858588695526123,
0.5251399874687195,
0.4250997304916382,
-0.13799038529396057,
-0.755222737789154,
-0.5173088312149048,
0.42783868312835693,
0.534252405166626,
-1.505658745765686,
1.8527545928955078,
... |
func (s *BaseBrainfuckListener) ExitEveryRule(ctx antlr.ParserRuleContext) {} | [
-0.08012071251869202,
0.04087993502616882,
0.24674881994724274,
-0.2897486388683319,
0.9024129509925842,
0.5241019129753113,
0.3561461567878723,
0.18747755885124207,
-0.9115593433380127,
0.038773614913225174,
-0.15613731741905212,
-0.10845789313316345,
-1.2649996280670166,
1.88571834564208... |
func (s *BaseBrainfuckListener) EnterProgram(ctx *ProgramContext) {} | [
0.3939858376979828,
0.036823708564043045,
0.4807206094264984,
0.7618685960769653,
0.7884289026260376,
0.5001636743545532,
1.58885657787323,
-0.4204932451248169,
0.7775731086730957,
0.09022632241249084,
0.14040139317512512,
0.32685238122940063,
-1.7252193689346313,
0.2656504213809967,
0.1... |
func (s *BaseBrainfuckListener) ExitProgram(ctx *ProgramContext) {} | [
-0.29449740052223206,
0.09840156883001328,
0.35712161660194397,
0.3087509572505951,
0.5714195966720581,
0.27148693799972534,
1.5070278644561768,
-0.008896772749722004,
0.5706204175949097,
0.6008350253105164,
-0.5785292983055115,
-0.2005356401205063,
-1.2339112758636475,
0.2807299792766571,... |
func (s *BaseBrainfuckListener) EnterCommand(ctx *CommandContext) {} | [
0.543843686580658,
-0.03178815543651581,
0.45284295082092285,
0.7139769792556763,
1.3674453496932983,
0.5780830979347229,
1.3033297061920166,
-0.09391196817159653,
0.5344680547714233,
-0.5741901993751526,
0.34570905566215515,
0.429511696100235,
-1.3399893045425415,
0.9185417294502258,
-0... |
func (s *BaseBrainfuckListener) ExitCommand(ctx *CommandContext) {} | [
-0.38809579610824585,
-0.0683198869228363,
0.3400406241416931,
0.1651395857334137,
1.1303317546844482,
0.30635085701942444,
1.134962558746338,
0.31649360060691833,
0.47872424125671387,
-0.2664896845817566,
-0.27604612708091736,
0.011876905336976051,
-0.7363476753234863,
0.9345478415489197,... |
func (s *BaseBrainfuckListener) EnterLoop(ctx *LoopContext) {} | [
0.251149982213974,
0.23327884078025818,
0.4341645836830139,
0.8214611411094666,
0.5126163363456726,
0.5671406388282776,
0.9196308255195618,
-0.7068690657615662,
0.33972829580307007,
0.04133046790957451,
0.27969878911972046,
0.26890718936920166,
-1.164576768875122,
0.3486078977584839,
-0.... |
func (s *BaseBrainfuckListener) ExitLoop(ctx *LoopContext) {} | [
-0.6073489785194397,
0.7487845420837402,
0.2760213017463684,
0.6655352115631104,
0.4336305260658264,
0.44170263409614563,
0.7924807667732239,
-0.14641417562961578,
0.10031548142433167,
0.5211397409439087,
-0.4606770873069763,
-0.7214487791061401,
-0.766096830368042,
0.6397053003311157,
-... |
func (s *BaseBrainfuckListener) EnterOp(ctx *OpContext) {} | [
-0.1573355793952942,
0.24355705082416534,
0.5549451112747192,
1.0203030109405518,
0.3465823233127594,
0.06110608950257301,
1.2117515802383423,
-0.18995313346385956,
0.46189528703689575,
0.5797370672225952,
0.24166911840438843,
-0.5533754825592041,
-1.081313967704773,
-0.6071851849555969,
... |
func (s *BaseBrainfuckListener) ExitOp(ctx *OpContext) {} | [
-0.5214555263519287,
0.5472129583358765,
0.4346383810043335,
0.8984429836273193,
0.10417384654283524,
0.011490912176668644,
1.0298576354980469,
0.1096680536866188,
0.6252516508102417,
0.9060966372489929,
-0.6051420569419861,
-1.4028431177139282,
-0.6296079158782959,
-0.3901625871658325,
... |
func firstMessageRoundTrip(t *testing.T,
init func(m *core.Message)) (*core.Message, error) {
// Pretend that a bad startup packet is being serialized
// and sent to the server.
rwc := newInMemRwc()
sms := core.NewBackendStream(rwc)
var m core.Message
init(&m)
sms.Send(&m)
// Reuse the buffer that has been f... | [
0.46300414204597473,
0.09079067409038544,
0.5430389642715454,
-0.6679717898368835,
0.27323803305625916,
-0.4536046087741852,
0.06900229305028915,
-0.8136707544326782,
0.08799409121274948,
-1.0569982528686523,
0.7359868884086609,
0.4563915431499481,
-0.8678351044654846,
0.9780230522155762,
... |
func StoreData(s *Server) gin.HandlerFunc {
return func(c *gin.Context) {
var data LevelGaugeData
if err := c.BindJSON(&data); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"status": "JSON Body is missing fields"})
return
}
if err := data.Validate(); err != nil {
c.JSON(http.StatusBadRequest, gin... | [
-0.6312695145606995,
0.3613252341747284,
0.8848927021026611,
-0.14799746870994568,
-0.2848537564277649,
1.0805760622024536,
-0.4275476038455963,
-0.4028482437133789,
-0.23823636770248413,
0.44795289635658264,
-0.13959534466266632,
0.4429675340652466,
-0.5566025376319885,
1.155805230140686,... |
func RetrieveData(s *Server) gin.HandlerFunc {
return func(c *gin.Context) {
var data = struct {
DeviceId string `json:"deviceid"`
}{
DeviceId: "",
}
if err := c.BindJSON(&data); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"status": "JSON Body is missing fields"})
return
}
dataSlice, err... | [
-0.832025945186615,
0.2707359492778778,
0.7717307806015015,
-0.14442962408065796,
0.22183021903038025,
0.10614471882581711,
-0.3869093656539917,
-0.6544039845466614,
0.04672743007540703,
0.07688596844673157,
-0.38921844959259033,
0.28373414278030396,
-0.1744498610496521,
1.3355270624160767... |
func GenerateToken(s *Server) gin.HandlerFunc {
return func(c *gin.Context) {
var data TokenParameter
if err := c.BindJSON(&data); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"status": "JSON Body is missing fields"})
return
}
if err := data.Validate(); err != nil {
c.JSON(http.StatusBadRequest,... | [
-0.9999157190322876,
0.19111330807209015,
0.7726470828056335,
-0.1525818407535553,
-0.34245359897613525,
0.3734920620918274,
-0.20031900703907013,
0.8264197111129761,
0.5616680383682251,
0.4962553381919861,
-0.6192079186439514,
0.5815999507904053,
0.6804196834564209,
0.17736178636550903,
... |
func CloseSession(s *Server) gin.HandlerFunc {
return func(c *gin.Context) {
var data = struct {
Token string `json:"token" binding:"required"`
}{}
if err := c.BindJSON(&data); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"status": "JSON Body is missing fields"})
return
}
if _, redisErr := s.R... | [
-1.2171589136123657,
-0.978054940700531,
0.9200713634490967,
-0.746555507183075,
-0.6374979615211487,
0.5130504965782166,
0.05280500277876854,
-0.151569202542305,
0.48719343543052673,
0.5978089570999146,
0.01733843795955181,
0.4817863404750824,
-0.23421990871429443,
0.418376088142395,
0.... |
func loadConfig() *config {
c := &config{}
defaults := configDefaults[Env()]
configFile, err := loadConfigFile(os.ExpandEnv("$HOME/.gotrix/config.json"))
if err != nil {
log.Fatal(err)
}
c.ApplicationName = configValue("APPLICATION_NAME", configFile.ApplicationName, defaults.ApplicationName)
c.DatabaseURL = c... | [
0.42740216851234436,
0.21187759935855865,
0.511128842830658,
-0.004876119550317526,
0.21535852551460266,
0.75198894739151,
-0.5512309670448303,
0.512505054473877,
-1.3023617267608643,
0.8986366391181946,
-0.4651203155517578,
0.1483730673789978,
-0.32959434390068054,
0.9246203303337097,
0... |
func NewRouter() *mux.Router {
router := mux.NewRouter().StrictSlash(true)
// Iterate over the routes and attach them to the router instance
for _, route := range routes {
router.
Methods(route.Method).
Path(route.Pattern).
Name(route.Name).
Handler(route.HandleFunc)
}
return router
} | [
0.2643275856971741,
-0.2120148241519928,
0.2469222992658615,
0.02133984863758087,
-0.5747228264808655,
0.35776421427726746,
-0.5785780549049377,
0.6462279558181763,
0.43332552909851074,
-1.1062456369400024,
0.44138303399086,
0.13983507454395294,
0.019737258553504944,
0.6214473247528076,
... |
func TestMain(m *testing.M) {
color.NoColor = true
flag.Parse()
opt.Paths = flag.Args()
status := godog.RunWithOptions("godogs", func(s *godog.Suite) {
steps.CliContext(s)
steps.EnvContext(s)
steps.VersionFeatureContext(s)
}, opt)
if st := m.Run(); st > status {
status = st
}
os.Exit(status)
} | [
-0.1095811128616333,
0.7586166262626648,
0.6550323367118835,
0.8554365038871765,
0.2140880972146988,
0.74334317445755,
0.4995894432067871,
0.4422202408313751,
-0.5020538568496704,
0.19170890748500824,
-0.32585665583610535,
0.15270419418811798,
-0.42871060967445374,
0.46215417981147766,
-... |
func main() {
res := canFinish(2, [][]int{[]int{0, 1}})
// 998001
fmt.Println(res)
} | [
-0.0598587840795517,
-0.18616650998592377,
0.4280840754508972,
1.6639868021011353,
-0.29406416416168213,
0.17104022204875946,
1.0411070585250854,
-0.39619436860084534,
-0.9822240471839905,
0.2470395863056183,
-0.33534136414527893,
0.41712486743927,
0.0935065746307373,
0.6307063102722168,
... |
func getTimeLastUpdatedTimestamp(metadata *metav1.ObjectMeta) (string, error) {
if len(metadata.ManagedFields) == 0 {
return "", errors.New("error, metadata.ManagedFields was empty")
}
latestTime := metadata.ManagedFields[0].Time
for i := 1; i < len(metadata.ManagedFields); i++ {
var currentTime = metadata.Man... | [
-0.11640548706054688,
-0.32749977707862854,
1.1103098392486572,
-0.08498359471559525,
0.2883912920951843,
0.3680359125137329,
-0.13027353584766388,
-0.7743211388587952,
0.08697354793548584,
0.6845391392707825,
0.15926451981067657,
-0.11105877161026001,
-0.2882871925830841,
0.71569114923477... |
func (kv *KVServer) Kill() {
kv.rf.Kill()
// Your code here, if desired.
close(kv.shutdown)
} | [
-0.5766313672065735,
-0.8462688326835632,
0.4459139406681061,
2.3345134258270264,
-0.40154606103897095,
0.35408759117126465,
-0.9533962607383728,
0.5723866820335388,
0.08065543323755264,
0.1713458150625229,
0.49537721276283264,
-0.6179994344711304,
-0.3551591634750366,
0.411969929933548,
... |
func StartKVServer(servers []*labrpc.ClientEnd, me int, persister *raft.Persister, maxraftstate int) *KVServer {
// call labgob.Register on structures you want
// Go's RPC library to marshall/unmarshall.
labgob.Register(Op{})
kv := new(KVServer)
kv.me = me
kv.maxraftstate = maxraftstate
kv.persister = persister... | [
0.17649713158607483,
-0.10296893864870071,
0.6452309489250183,
0.45260360836982727,
-0.31007128953933716,
0.15589281916618347,
-0.29331475496292114,
-0.1185489371418953,
0.4070769250392914,
-0.36085939407348633,
-0.0833258405327797,
0.4469965398311615,
-0.7195063233375549,
0.33949390053749... |
func (s DescribeStorageInput) String() string {
return awsutil.Prettify(s)
} | [
0.76876300573349,
0.12584561109542847,
0.1384260058403015,
-0.616557240486145,
-0.3986414968967438,
0.8855581283569336,
0.5495144724845886,
-0.8127133846282959,
-0.06398367136716843,
-0.38353899121284485,
0.12667544186115265,
1.2912955284118652,
0.3488543927669525,
-0.3728705942630768,
0... |
func (s DescribeStorageOutput) String() string {
return awsutil.Prettify(s)
} | [
1.2892851829528809,
-0.271137535572052,
0.1783062368631363,
-0.43695268034935,
-0.6314815878868103,
-0.005294961854815483,
0.5489969253540039,
-0.7343600392341614,
-0.6067246198654175,
-0.33470413088798523,
0.423959881067276,
0.8567429780960083,
0.6090983748435974,
-0.5400263071060181,
0... |
func (r DescribeStorageRequest) Send(ctx context.Context) (*DescribeStorageResponse, error) {
r.Request.SetContext(ctx)
err := r.Request.Send()
if err != nil {
return nil, err
}
resp := &DescribeStorageResponse{
DescribeStorageOutput: r.Request.Data.(*DescribeStorageOutput),
response: &aws.Resp... | [
-0.522180438041687,
0.332725465297699,
0.34484854340553284,
-0.06740709394216537,
0.3176373541355133,
-0.17702260613441467,
-0.24428240954875946,
-0.8329151272773743,
-0.09731104969978333,
-0.03509737178683281,
0.3848020136356354,
1.1290616989135742,
-0.5264409780502319,
0.4351469576358795... |
func (r *DescribeStorageResponse) SDKResponseMetdata() *aws.Response {
return r.response
} | [
0.4607411026954651,
0.06583593040704727,
0.31364741921424866,
-0.20574508607387543,
-0.22906260192394257,
-0.05054866895079613,
-0.763192892074585,
-0.2590304911136627,
0.8293765187263489,
-0.43801233172416687,
-0.03923880681395531,
0.19593048095703125,
0.12063466012477875,
-0.924481391906... |
func (in *Loki) DeepCopyInto(out *Loki) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
out.Status = in.Status
return
} | [
0.5172494649887085,
-0.5486582517623901,
0.5661567449569702,
-0.13825009763240814,
-0.7122080326080322,
0.6012036800384521,
-0.09948108345270157,
0.7497797608375549,
-1.379246473312378,
-0.5713731050491333,
-0.877128005027771,
1.4852731227874756,
0.28691551089286804,
-0.4672743082046509,
... |
func (in *Loki) DeepCopy() *Loki {
if in == nil {
return nil
}
out := new(Loki)
in.DeepCopyInto(out)
return out
} | [
0.05064152553677559,
0.0685180276632309,
0.3517431318759918,
0.6153873205184937,
-0.6731312870979309,
0.5040831565856934,
0.0052509852685034275,
0.2947182357311249,
-0.37117892503738403,
-0.7065508365631104,
-0.601284384727478,
0.6301084756851196,
-0.7907806038856506,
-1.0989505052566528,
... |
func (in *Loki) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
} | [
-0.04150089621543884,
-0.08523447066545486,
0.5414057970046997,
0.18268989026546478,
-0.48020511865615845,
0.5896098613739014,
0.6686635613441467,
0.1144171804189682,
-0.7446981072425842,
-0.8848063349723816,
-0.5337867140769958,
0.07616464793682098,
-0.034447286278009415,
-0.4258127212524... |
func (in *LokiDeployment) DeepCopyInto(out *LokiDeployment) {
*out = *in
if in.Annotations != nil {
in, out := &in.Annotations, &out.Annotations
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.Labels != nil {
in, out := &in.Labels, &out.Labels
*out = m... | [
0.044166289269924164,
-0.6350603699684143,
0.6671982407569885,
-0.09169966727495193,
-0.5751951932907104,
-0.04459630697965622,
0.012218213640153408,
0.14675021171569824,
-0.4617457389831543,
0.04568032920360565,
-0.5705310702323914,
0.35636141896247864,
-0.04978356137871742,
-0.0809065848... |
func (in *LokiDeployment) DeepCopy() *LokiDeployment {
if in == nil {
return nil
}
out := new(LokiDeployment)
in.DeepCopyInto(out)
return out
} | [
-0.7973673939704895,
-0.15783214569091797,
-0.01666114665567875,
-0.09487596154212952,
-0.2640553116798401,
-0.4801667034626007,
0.08033447712659836,
0.27461665868759155,
0.1981143057346344,
-0.0800936296582222,
-0.639441967010498,
-0.34811389446258545,
-0.7427964210510254,
0.1729903370141... |
func (in *LokiIngress) DeepCopyInto(out *LokiIngress) {
*out = *in
if in.Annotations != nil {
in, out := &in.Annotations, &out.Annotations
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.Labels != nil {
in, out := &in.Labels, &out.Labels
*out = make(ma... | [
-0.1597740799188614,
-0.3714856803417206,
0.685854971408844,
-1.1040174961090088,
-1.0218201875686646,
0.058080315589904785,
-0.6205284595489502,
0.6917733550071716,
-0.9609432220458984,
-0.28992611169815063,
-0.47470176219940186,
1.123703122138977,
-0.27532216906547546,
-0.879472315311431... |
func (in *LokiIngress) DeepCopy() *LokiIngress {
if in == nil {
return nil
}
out := new(LokiIngress)
in.DeepCopyInto(out)
return out
} | [
-0.7491697669029236,
-0.3773437738418579,
0.2523162364959717,
-0.0104329539462924,
-0.5038663148880005,
0.11042490601539612,
-0.42820146679878235,
0.37390056252479553,
0.11764627695083618,
-0.37068015336990356,
-1.1116708517074585,
0.5898252129554749,
-1.431939959526062,
-1.303393959999084... |
func (in *LokiList) DeepCopyInto(out *LokiList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]Loki, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
} | [
0.08018147945404053,
0.06340034306049347,
0.5356271266937256,
0.189629465341568,
-0.5447924733161926,
0.215688094496727,
-0.49819663166999817,
0.9401928186416626,
-0.8629167079925537,
0.0682411789894104,
-1.1758497953414917,
0.7908393144607544,
-0.44447240233421326,
-0.3887609839439392,
... |
func (in *LokiList) DeepCopy() *LokiList {
if in == nil {
return nil
}
out := new(LokiList)
in.DeepCopyInto(out)
return out
} | [
-0.4405592679977417,
-0.08205674588680267,
0.01338281575590372,
1.0150610208511353,
-0.4616362452507019,
0.17545703053474426,
-0.818462610244751,
0.4104667901992798,
0.33127427101135254,
-0.010523954406380653,
-1.471269130706787,
0.3070090115070343,
-1.0833617448806763,
-0.4404616355895996... |
func (in *LokiList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
} | [
-0.4083647131919861,
-0.09175197780132294,
0.4404202997684479,
0.3497374355792999,
-0.3698546290397644,
0.5937456488609314,
0.24172791838645935,
0.38330960273742676,
-0.37020859122276306,
-0.5009417533874512,
-1.0824593305587769,
-0.02840275876224041,
-0.3204524517059326,
-0.12767247855663... |
func (in *LokiService) DeepCopyInto(out *LokiService) {
*out = *in
if in.Annotations != nil {
in, out := &in.Annotations, &out.Annotations
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.Labels != nil {
in, out := &in.Labels, &out.Labels
*out = make(ma... | [
0.22297723591327667,
-0.13424688577651978,
0.7312526702880859,
-0.7718191146850586,
-0.9128637313842773,
0.04184902459383011,
-0.5511943101882935,
0.13820408284664154,
-1.0930098295211792,
-0.4708855152130127,
-0.5945792198181152,
1.256814956665039,
-0.3169984221458435,
-0.5014051795005798... |
func (in *LokiService) DeepCopy() *LokiService {
if in == nil {
return nil
}
out := new(LokiService)
in.DeepCopyInto(out)
return out
} | [
-0.1938616931438446,
0.11731061339378357,
0.08403707295656204,
0.23909586668014526,
-0.23439286649227142,
-0.15382236242294312,
-0.7282428741455078,
-0.5298193097114563,
-0.1443094164133072,
-1.139769196510315,
-0.6183047294616699,
0.7468792200088501,
-1.2443875074386597,
-0.36408618092536... |
func (in *LokiServiceAccount) DeepCopyInto(out *LokiServiceAccount) {
*out = *in
if in.Annotations != nil {
in, out := &in.Annotations, &out.Annotations
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.Labels != nil {
in, out := &in.Labels, &out.Labels
... | [
0.3924117982387543,
-0.2241280972957611,
0.5702475905418396,
-0.5080897808074951,
-0.6658060550689697,
-0.015527419745922089,
0.08300597965717316,
0.41202715039253235,
-0.800152063369751,
-0.41827860474586487,
-0.3718358278274536,
1.2982977628707886,
0.04340876266360283,
-0.559499979019165... |
func (in *LokiServiceAccount) DeepCopy() *LokiServiceAccount {
if in == nil {
return nil
}
out := new(LokiServiceAccount)
in.DeepCopyInto(out)
return out
} | [
0.33138346672058105,
-0.07429295778274536,
0.06605776399374008,
-0.1221647784113884,
-0.419542521238327,
-0.0027837438974529505,
0.49843400716781616,
-0.07010402530431747,
-0.11263733357191086,
-1.2003003358840942,
-0.3617139160633087,
0.9479638338088989,
-0.09451904892921448,
-0.250543683... |
func (in *LokiSpec) DeepCopyInto(out *LokiSpec) {
*out = *in
if in.ServiceMonitorSelector != nil {
in, out := &in.ServiceMonitorSelector, &out.ServiceMonitorSelector
*out = new(metav1.LabelSelector)
(*in).DeepCopyInto(*out)
}
if in.ServiceMonitorNamespaceSelector != nil {
in, out := &in.ServiceMonitorNamesp... | [
0.3492487967014313,
-0.607090413570404,
0.6632069945335388,
-0.16633568704128265,
-0.20050431787967682,
-0.14747770130634308,
-0.2857179641723633,
-0.13609744608402252,
-0.7236294150352478,
-0.27345433831214905,
-0.8907864689826965,
0.9233814477920532,
0.12156393378973007,
0.10105806589126... |
func (in *LokiSpec) DeepCopy() *LokiSpec {
if in == nil {
return nil
}
out := new(LokiSpec)
in.DeepCopyInto(out)
return out
} | [
0.537310004234314,
0.3272932469844818,
0.2028784602880478,
-0.2447916865348816,
-0.5291988849639893,
0.3535902202129364,
-0.6684862971305847,
0.008767816238105297,
-0.5252801179885864,
0.033996302634477615,
-1.2840250730514526,
0.49399760365486145,
-0.29239025712013245,
-0.806911051273346,... |
func (in *LokiStatus) DeepCopyInto(out *LokiStatus) {
*out = *in
return
} | [
0.8174236416816711,
0.16970470547676086,
0.321294903755188,
-0.2384636253118515,
-1.1144583225250244,
0.7020100355148315,
-0.5006290078163147,
1.0588672161102295,
-1.1223002672195435,
-0.7625158429145813,
-1.31350576877594,
1.4557316303253174,
0.19369648396968842,
-0.7643078565597534,
-0... |
func (in *LokiStatus) DeepCopy() *LokiStatus {
if in == nil {
return nil
}
out := new(LokiStatus)
in.DeepCopyInto(out)
return out
} | [
0.14358194172382355,
0.12716542184352875,
-0.3125571608543396,
0.056538406759500504,
-0.7956793904304504,
0.07641959190368652,
-0.5639042854309082,
0.10288406908512115,
-0.15057916939258575,
-0.6124178171157837,
-1.4442218542099,
0.34318816661834717,
-0.5420668721199036,
-0.818682610988616... |
func refFromCtx(ctx context.Context) string {
return depot.DefaultBranchName
} | [
0.8177258372306824,
-0.24186734855175018,
0.2607767581939697,
0.058394692838191986,
-0.12542574107646942,
1.417236328125,
-0.48170995712280273,
-0.11763319373130798,
0.2419474720954895,
-0.2330498993396759,
0.03305312991142273,
-1.3229222297668457,
-0.014066249132156372,
0.3654497563838959... |
func defaultConfig() *config.Config {
return &config.Config{
TargetAnnotation: "bio.terra.testing/snapshot-policy",
GoogleProject: "fake-project",
Region: "us-central1",
}
} | [
0.6343282461166382,
0.6256971955299377,
0.06131906434893608,
0.3783387541770935,
0.6954875588417053,
1.4507042169570923,
-0.3291056752204895,
0.9452407956123352,
0.2866124212741852,
0.037440743297338486,
0.002807303098961711,
0.0882982388138771,
0.4860450327396393,
0.5186758637428284,
-0... |
func fakeGcp() (*compute.Service, error) {
client := &http.Client{}
httpmock.ActivateNonDefault(client)
return compute.NewService(context.Background(), option.WithoutAuthentication(), option.WithHTTPClient(client))
} | [
0.3482353091239929,
0.5571639537811279,
0.4380256235599518,
-0.25354719161987305,
0.3236043155193329,
0.5137305855751038,
-0.39899539947509766,
-1.0667095184326172,
0.2819414436817169,
1.2352375984191895,
-0.326715350151062,
0.4141268730163574,
-1.4919015169143677,
-0.14172253012657166,
... |
func registerResponders(requests []gcpRequest) {
for _, request := range requests {
httpmock.RegisterResponder(request.method, request.url, request.responder)
}
} | [
-1.439594030380249,
0.3438352048397064,
0.5090476274490356,
0.11246154457330704,
1.864778995513916,
0.4268416464328766,
-0.7601737976074219,
-0.3920179605484009,
0.36853551864624023,
-0.4037332832813263,
-0.38657712936401367,
-0.9948753118515015,
-0.8706148862838745,
1.0342234373092651,
... |
func verifyCallCounts(requests []gcpRequest) error {
counts := httpmock.GetCallCountInfo()
for _, request := range requests {
key := fmt.Sprintf("%s %s", request.method, request.url)
if counts[key] != request.callCount {
return fmt.Errorf("%s: %d calls expected, %d received", key, request.callCount, counts[key... | [
0.5005485415458679,
0.4168618619441986,
0.35933101177215576,
0.2700657546520233,
1.064393401145935,
1.0745328664779663,
-0.3918581008911133,
-0.9353543519973755,
0.06698674708604813,
-0.8187553882598877,
0.01833450049161911,
-0.5313501358032227,
-0.3742959201335907,
1.4535843133926392,
0... |
func fakeGetPolicy(cfg *config.Config, name string, callCount int) gcpRequest {
url := fakePolicyLink(cfg.GoogleProject, cfg.Region, name)
policy := &compute.ResourcePolicy{
Name: name,
SelfLink: url,
}
return fakeGetRequest(url, 200, policy, callCount)
} | [
0.0330970399081707,
0.4328014552593231,
0.2052047848701477,
-0.47612208127975464,
0.4325215220451355,
0.11248910427093506,
-0.621160626411438,
-0.3910958766937256,
0.24379754066467285,
0.0682600885629654,
-0.38715535402297974,
0.696647047996521,
-0.541358232498169,
0.6092193126678467,
-0... |
func fakeListZonalDisk(cfg *config.Config, name string, zone string, policies []string, callCount int) gcpRequest {
scope := fmt.Sprintf("zones/%s", zone)
disk := fakeZonalDisk(cfg, name, zone, policies)
return fakeDiskAggregatedListRequest(cfg, scope, disk, callCount)
} | [
-0.48640766739845276,
0.18257682025432587,
0.288339763879776,
0.1390112191438675,
0.08584829419851303,
-0.4553236663341522,
-0.042168620973825455,
0.21238073706626892,
0.5726494789123535,
0.3855123519897461,
-0.9623887538909912,
0.5694270730018616,
0.05068462714552879,
1.0408129692077637,
... |
func fakeListRegionalDisk(cfg *config.Config, name string, region string, policies []string, callCount int) gcpRequest {
scope := fmt.Sprintf("regions/%s", region)
disk := fakeRegionalDisk(cfg, name, region, policies)
return fakeDiskAggregatedListRequest(cfg, scope, disk, callCount)
} | [
-0.31501707434654236,
0.38412660360336304,
0.4042927324771881,
-0.5769438743591309,
0.10544650256633759,
-0.5283122658729553,
-0.5582873225212097,
0.15928001701831818,
0.44226303696632385,
0.30583155155181885,
-0.7715693712234497,
0.4213440418243408,
0.0998968780040741,
0.8417194485664368,... |
func fakePolicyLinks(project string, region string, policyNames ...string) []string {
links := make([]string, len(policyNames))
for i, policyName := range policyNames {
links[i] = fakePolicyLink(project, region, policyName)
}
return links
} | [
-0.88027024269104,
-0.5030241012573242,
0.1189323365688324,
-0.45595309138298035,
0.2819298207759857,
1.18880033493042,
-1.1331344842910767,
0.14212346076965332,
0.27969780564308167,
0.6059859395027161,
-0.8481698036193848,
0.5456606149673462,
-1.026248574256897,
0.5273563265800476,
-1.0... |
func fakePolicyLink(project string, region string, policyName string) string {
return fmt.Sprintf("%s/projects/%s/regions/%s/resourcePolicies/%s", gcpComputeURL, project, region, policyName)
} | [
0.3982839584350586,
-0.6850563883781433,
0.051848966628313065,
-0.9505545496940613,
0.18732760846614838,
1.2214059829711914,
-0.6142928004264832,
-0.02865537814795971,
-0.23219850659370422,
0.5710871815681458,
-0.030196266248822212,
0.8764759302139282,
-0.6478827595710754,
-0.0688787847757... |
func fakeZoneLink(project string, zone string) string {
return fmt.Sprintf("%s/projects/%s/zones/%s", gcpComputeURL, project, zone)
} | [
-0.05506712198257446,
-0.2268228381872177,
0.06194927543401718,
0.01683667115867138,
0.35597461462020874,
0.3819520175457001,
0.7482832670211792,
0.21365103125572205,
-0.14976662397384644,
0.2535528540611267,
-0.18303245306015015,
0.9701439738273621,
-1.0516047477722168,
0.1776493042707443... |
func fakeRegionLink(project string, region string) string {
return fmt.Sprintf("%s/projects/%s/regions/%s", gcpComputeURL, project, region)
} | [
0.10408931225538254,
-0.41318029165267944,
0.0406135693192482,
-0.5276990532875061,
0.3042539954185486,
0.44328540563583374,
-0.3742038905620575,
0.09881284832954407,
-0.5708988308906555,
0.06264291703701019,
0.38857242465019226,
1.2148867845535278,
-0.824999988079071,
-0.02953335270285606... |
func fakePostRequest(url string, expectedRequestBody interface{}, status int, responseBody interface{}, callCount int) gcpRequest {
responder := func(req *http.Request) (*http.Response, error) {
// We need to compare the _expected_ request body with the _actual_ request body,
// to make sure we're sending the righ... | [
-0.45801880955696106,
-0.6773611307144165,
0.8364594578742981,
-0.4240976572036743,
-0.04137948155403137,
-0.09677214175462723,
-0.39651116728782654,
-0.5900905728340149,
-0.15160244703292847,
0.01007575448602438,
-0.2094220221042633,
-0.3326075077056885,
-0.4230363368988037,
0.21492220461... |
func fakePVC(name string, volumeName string, annotations map[string]string) *v1.PersistentVolumeClaim {
return &v1.PersistentVolumeClaim{
ObjectMeta: metav1.ObjectMeta{
Name: name,
Annotations: annotations,
},
Spec: v1.PersistentVolumeClaimSpec{
VolumeName: volumeName,
},
}
} | [
0.3508124351501465,
-0.9706311225891113,
0.6793662309646606,
-0.3907991349697113,
-0.6699631810188293,
0.37492161989212036,
-1.323792576789856,
0.19028759002685547,
-0.08658570796251297,
-0.07486175000667572,
0.4933982789516449,
0.7604467868804932,
-0.6787254214286804,
-0.19527779519557953... |
func (svc *DynamoDB) CreateTable(ctx context.Context, r CreateTableRequest) (*CreateTableResult, error) {
out, err := svc.RawCreateTable(ctx, r.ToInput())
if err == nil {
return NewCreateTableResult(out), nil
}
err = svc.errWrap(errors.ErrorData{
Err: err,
AWSOperation: "CreateTable",
})
svc.Error... | [
-0.8876343965530396,
0.13381293416023254,
0.7200667858123779,
0.43233412504196167,
0.3007596433162689,
0.31428825855255127,
0.9442974328994751,
-0.9652836322784424,
0.16912944614887238,
-0.21991030871868134,
-0.08754561841487885,
-0.15157076716423035,
0.0029376524034887552,
-0.035498980432... |
func GetOrder(id int) (*model.Order, error) {
return orderdao.GetOrder("id", id)
} | [
-0.3139551281929016,
0.101638063788414,
0.14248494803905487,
1.2036668062210083,
0.6279733180999756,
-0.5906463265419006,
-0.4279344975948334,
0.06317348778247833,
0.260122150182724,
-0.35195696353912354,
-0.7357502579689026,
-0.24704472720623016,
0.46350499987602234,
0.5458481907844543,
... |
func LoadSubOrders(order *model.Order) ([]*model.Order, error) {
// now := time.Now()
suborders, err := orderdao.ListSubOrders(order.TrackNumber)
if err != nil {
return nil, err
}
// load all details. cascaded.
for _, o := range suborders {
details, err := orderdao.GetOrderDetails(o.TrackNumber)
if err != n... | [
-0.04405134916305542,
0.9676547646522522,
0.501719057559967,
0.5778301954269409,
0.061718590557575226,
-0.4581434428691864,
-0.267320841550827,
-0.24250607192516327,
0.08206932246685028,
-0.16947203874588013,
-1.3000751733779907,
-0.053258512169122696,
-0.28512004017829895,
0.8191133141517... |
func Network(network string) ServerOption {
return func(s *Server) {
s.network = network
}
} | [
-0.7298268675804138,
0.14770832657814026,
0.16545483469963074,
1.0281356573104858,
0.5275617837905884,
0.3411669433116913,
0.18272535502910614,
0.08207530528306961,
0.7258837819099426,
-0.20928740501403809,
-1.367347002029419,
-0.2484745979309082,
-0.08224806934595108,
0.6601954102516174,
... |
func Address(addr string) ServerOption {
return func(s *Server) {
s.address = addr
}
} | [
-0.12207354605197906,
-0.44107791781425476,
0.41790738701820374,
-0.12429548054933548,
-0.5007585883140564,
1.0230028629302979,
0.5158273577690125,
0.6713233590126038,
1.9602017402648926,
-0.05120587348937988,
-0.649042010307312,
1.447188377380371,
0.06907398253679276,
1.0583807229995728,
... |
func Endpoint(endpoint *url.URL) ServerOption {
return func(s *Server) {
s.endpoint = endpoint
}
} | [
0.07726448029279709,
0.23619042336940765,
0.2445226013660431,
0.17464464902877808,
0.35522398352622986,
0.38231173157691956,
0.15912985801696777,
0.6305789947509766,
1.18386709690094,
-0.6054959893226624,
-0.6876182556152344,
1.036460041999817,
-0.5019087195396423,
0.28458961844444275,
-... |
func Timeout(timeout time.Duration) ServerOption {
return func(s *Server) {
s.timeout = timeout
}
} | [
0.10860870778560638,
0.49586570262908936,
0.22763068974018097,
-0.07219415158033371,
-0.14428217709064484,
0.8801296353340149,
0.28065091371536255,
0.646023154258728,
1.2344225645065308,
0.4773545563220978,
-0.4872165620326996,
1.4180176258087158,
0.0007760542794130743,
0.09967384487390518... |
func Logger(_ log.Logger) ServerOption {
return func(s *Server) {}
} | [
-0.7468125820159912,
0.32513171434402466,
0.22802643477916718,
-0.19946587085723877,
-0.3408505916595459,
-0.46276113390922546,
0.4515426456928253,
-0.09931733459234238,
1.07521653175354,
-0.9214476346969604,
-1.0512640476226807,
0.7738527655601501,
0.21861737966537476,
1.31685471534729,
... |
func Middleware(m ...middleware.Middleware) ServerOption {
return func(o *Server) {
o.middleware.Use(m...)
}
} | [
0.20598310232162476,
0.49231022596359253,
0.4088766872882843,
0.600062906742096,
0.49586760997772217,
-0.09551245719194412,
-0.14759944379329681,
-0.15694460272789001,
0.367430180311203,
-0.5436518788337708,
-0.13807323575019836,
0.35621166229248047,
-0.5414703488349915,
0.2715927958488464... |
func Filter(filters ...FilterFunc) ServerOption {
return func(o *Server) {
o.filters = filters
}
} | [
-0.01998003199696541,
0.4668329358100891,
0.3476463556289673,
0.33468005061149597,
-0.07642771303653717,
0.4334070086479187,
0.42135435342788696,
-0.09577691555023193,
0.2738220691680908,
-0.4032782018184662,
-0.6907311081886292,
1.2691693305969238,
-0.18317811191082,
0.3127448558807373,
... |
func RequestVarsDecoder(dec DecodeRequestFunc) ServerOption {
return func(o *Server) {
o.decVars = dec
}
} | [
-0.9926867485046387,
0.08535882085561752,
0.5637567639350891,
0.13627147674560547,
-0.5371569395065308,
0.36516591906547546,
-0.1742118000984192,
-0.010980603285133839,
0.06394987553358078,
-1.4868875741958618,
-0.3664998412132263,
0.5078316926956177,
-0.22992585599422455,
0.65100020170211... |
func RequestQueryDecoder(dec DecodeRequestFunc) ServerOption {
return func(o *Server) {
o.decQuery = dec
}
} | [
-0.5278123021125793,
0.05945229157805443,
0.4551416039466858,
0.5582993626594543,
-0.8893592357635498,
0.19961290061473846,
-0.5101931691169739,
0.131697416305542,
0.3577500283718109,
-1.3455594778060913,
-0.03223211690783501,
0.3804059326648712,
-0.1427670568227768,
0.8967491388320923,
... |
func RequestDecoder(dec DecodeRequestFunc) ServerOption {
return func(o *Server) {
o.decBody = dec
}
} | [
-0.826870858669281,
0.15114560723304749,
0.5700947642326355,
0.4889064431190491,
-0.6372509002685547,
0.2600678503513336,
-0.12098300457000732,
0.1287284642457962,
0.5402323603630066,
-1.5128369331359863,
-0.1026470810174942,
0.42129507660865784,
0.06269960105419159,
0.7928757667541504,
... |
func ResponseEncoder(en EncodeResponseFunc) ServerOption {
return func(o *Server) {
o.enc = en
}
} | [
0.6436171531677246,
-0.5203834772109985,
0.18212148547172546,
0.6065998673439026,
-0.6572433710098267,
0.1774207502603531,
1.316441535949707,
-0.09230536222457886,
1.1714019775390625,
-1.005660057067871,
-1.0889418125152588,
-0.5693891644477844,
0.1349770873785019,
0.21545149385929108,
0... |
func TLSConfig(c *tls.Config) ServerOption {
return func(o *Server) {
o.tlsConf = c
}
} | [
1.2497143745422363,
0.5732073187828064,
0.44135355949401855,
-1.2443745136260986,
-0.7697493433952332,
-0.11486204713582993,
-0.05867096409201622,
1.0551096200942993,
0.5255536437034607,
0.5284894108772278,
-1.898698091506958,
0.3247886896133423,
0.2734413146972656,
0.7040980458259583,
-... |
func StrictSlash(strictSlash bool) ServerOption {
return func(o *Server) {
o.strictSlash = strictSlash
}
} | [
1.272868037223816,
-0.07711499184370041,
0.45492205023765564,
0.3844793438911438,
0.001439794898033142,
0.7471314668655396,
0.21339264512062073,
0.40434563159942627,
0.6785679459571838,
-1.176717758178711,
-1.431679606437683,
0.5275464653968811,
-0.2093426138162613,
0.5135528445243835,
-... |
func Listener(lis net.Listener) ServerOption {
return func(s *Server) {
s.lis = lis
}
} | [
0.17939308285713196,
-0.2799522876739502,
0.13763900101184845,
-0.5754177570343018,
-0.43935516476631165,
0.991202175617218,
0.43200498819351196,
1.1358654499053955,
1.5392931699752808,
-0.5172087550163269,
-1.4032630920410156,
-0.34507474303245544,
0.5865445137023926,
0.8041534423828125,
... |
func PathPrefix(prefix string) ServerOption {
return func(s *Server) {
s.router = s.router.PathPrefix(prefix).Subrouter()
}
} | [
0.0008524730801582336,
-0.035650111734867096,
0.706058144569397,
0.42111262679100037,
-0.3746285140514374,
0.10736291110515594,
0.5930901765823364,
0.3444083631038666,
0.7402451038360596,
0.14671950042247772,
-1.0796146392822266,
0.9924280643463135,
-0.24579393863677979,
0.3525900244712829... |
func NewServer(opts ...ServerOption) *Server {
srv := &Server{
network: "tcp",
address: ":0",
timeout: 1 * time.Second,
middleware: matcher.New(),
decVars: DefaultRequestVars,
decQuery: DefaultRequestQuery,
decBody: DefaultRequestDecoder,
enc: DefaultResponseEncoder,
e... | [
-0.5330744981765747,
-0.04101194068789482,
0.4259856939315796,
0.48174604773521423,
0.21893347799777985,
0.281737357378006,
0.07968959212303162,
0.015986744314432144,
0.30845436453819275,
-0.24302086234092712,
-0.3724408745765686,
0.4211876094341278,
-0.7323666214942932,
0.6520174145698547... |
func (s *Server) Use(selector string, m ...middleware.Middleware) {
s.middleware.Add(selector, m...)
} | [
-1.1053786277770996,
-0.050112705677747726,
0.5792139768600464,
-0.09789334237575531,
0.23844663798809052,
-0.46806150674819946,
-0.39870214462280273,
-0.33936434984207153,
0.23574359714984894,
-0.3713824152946472,
-0.23620028793811798,
0.36838555335998535,
-1.0929967164993286,
1.017365694... |
func (s *Server) WalkRoute(fn WalkRouteFunc) error {
return s.router.Walk(func(route *mux.Route, router *mux.Router, ancestors []*mux.Route) error {
methods, err := route.GetMethods()
if err != nil {
return nil // ignore no methods
}
path, err := route.GetPathTemplate()
if err != nil {
return err
}
... | [
-0.2692723870277405,
0.04639924317598343,
0.5945473909378052,
-0.2737511098384857,
0.0736202672123909,
-0.4490010440349579,
0.471733033657074,
-0.061568114906549454,
-0.08455082029104233,
-0.5255235433578491,
-0.25896844267845154,
-0.24270273745059967,
0.010967524722218513,
1.2417147159576... |
func (s *Server) WalkHandle(handle func(method, path string, handler http.HandlerFunc)) error {
return s.WalkRoute(func(r RouteInfo) error {
handle(r.Method, r.Path, s.ServeHTTP)
return nil
})
} | [
-0.25379085540771484,
0.0792132243514061,
0.5493856072425842,
0.23012778162956238,
0.0838400274515152,
0.6871408820152283,
0.8919471502304077,
-0.2613079845905304,
-0.3930651843547821,
-0.9554094076156616,
-0.24415934085845947,
-0.10576996952295303,
-0.31194183230400085,
0.4676670730113983... |
func (s *Server) Route(prefix string, filters ...FilterFunc) *Router {
return newRouter(prefix, s, filters...)
} | [
-0.398855596780777,
0.45847976207733154,
0.28551432490348816,
0.3928733170032501,
-0.711366593837738,
-1.063922643661499,
-0.5580683946609497,
-0.24272491037845612,
-0.6132505536079407,
-0.7075009942054749,
-0.23024795949459076,
1.1933784484863281,
0.2844352722167969,
0.27342575788497925,
... |
func (s *Server) Handle(path string, h http.Handler) {
s.router.Handle(path, h)
} | [
-0.12598587572574615,
-0.033538565039634705,
0.4607909321784973,
0.5354900360107422,
0.4657571017742157,
1.0283831357955933,
0.4447302520275116,
0.16339263319969177,
-0.748727560043335,
-0.8762084245681763,
-0.5466962456703186,
0.5967193841934204,
-0.1401388943195343,
0.23134887218475342,
... |
func (s *Server) HandlePrefix(prefix string, h http.Handler) {
s.router.PathPrefix(prefix).Handler(h)
} | [
-0.3355861008167267,
-0.09478425234556198,
0.5032292008399963,
0.6731599569320679,
-0.08835900574922562,
-0.2204185426235199,
0.00866020005196333,
0.5974082946777344,
-0.07239757478237152,
-0.43677178025245667,
-0.48820915818214417,
0.05000992864370346,
0.5137777328491211,
0.93246912956237... |
func (s *Server) HandleFunc(path string, h http.HandlerFunc) {
s.router.HandleFunc(path, h)
} | [
0.2800997793674469,
-0.01929621770977974,
0.31323376297950745,
0.39407339692115784,
0.1739424616098404,
-0.009518329985439777,
1.186419129371643,
1.0263993740081787,
-0.6381486058235168,
-0.5935708284378052,
0.031040260568261147,
0.32122495770454407,
1.5963804721832275,
0.2155972719192505,... |
func (s *Server) HandleHeader(key, val string, h http.HandlerFunc) {
s.router.Headers(key, val).Handler(h)
} | [
-0.31103792786598206,
-0.46231746673583984,
0.4422002136707306,
0.8060528039932251,
-0.2858719527721405,
0.5193821787834167,
-0.07452437281608582,
0.23190085589885712,
-0.43702343106269836,
-0.6037620902061462,
0.28239747881889343,
-0.38770848512649536,
0.8043100237846375,
0.44505888223648... |
func (s *Server) ServeHTTP(res http.ResponseWriter, req *http.Request) {
s.Handler.ServeHTTP(res, req)
} | [
-0.06906557083129883,
0.00528723793104291,
0.1464412361383438,
0.8831582069396973,
0.054192282259464264,
1.0624475479125977,
0.2214752584695816,
0.4864731729030609,
-0.5787069201469421,
-0.06316033750772476,
-0.6358548998832703,
-0.5203363299369812,
0.35282662510871887,
0.31404900550842285... |
func (s *Server) Endpoint() (*url.URL, error) {
if err := s.listenAndEndpoint(); err != nil {
return nil, err
}
return s.endpoint, nil
} | [
0.13554133474826813,
-0.14407341182231903,
0.13772395253181458,
0.8742613196372986,
0.5082200169563293,
0.22332578897476196,
0.15766790509223938,
0.6298657655715942,
0.3631146550178528,
-0.7228467464447021,
0.7414204478263855,
0.8719749450683594,
-0.7928779721260071,
0.22389569878578186,
... |
func (s *Server) Start(ctx context.Context) error {
if err := s.listenAndEndpoint(); err != nil {
return err
}
s.BaseContext = func(net.Listener) context.Context {
return ctx
}
log.Infof("[HTTP] server listening on: %s", s.lis.Addr().String())
var err error
if s.tlsConf != nil {
err = s.ServeTLS(s.lis, "",... | [
-0.35285696387290955,
-0.5464255213737488,
0.35756030678749084,
-0.14234328269958496,
0.17801721394062042,
0.21491867303848267,
-0.32492488622665405,
0.6139925122261047,
0.11044034361839294,
0.12227524816989899,
-0.45466673374176025,
0.6221767663955688,
0.1511743813753128,
0.16857936978340... |
func (s *Server) Stop(ctx context.Context) error {
log.Info("[HTTP] server stopping")
return s.Shutdown(ctx)
} | [
-1.5743428468704224,
-0.1232408657670021,
-0.10215634852647781,
-0.2985025942325592,
0.5234066843986511,
0.8268014788627625,
-0.7005437016487122,
-0.12023299932479858,
0.2307276874780655,
0.526721179485321,
-0.4908786118030548,
1.0161566734313965,
-0.25382325053215027,
-0.459102600812912,
... |
func (c *Client) PrefixRoutingConsistency(resource string) (map[string]interface{}, error) {
m := make(map[string]string)
m["resource"] = resource
return c.execute(prefixRoutingConsistencyPath, m)
} | [
-1.398026704788208,
-0.23096105456352234,
0.6912018656730652,
-0.2932460904121399,
0.6732921004295349,
0.2691553831100464,
1.100195050239563,
0.6697064638137817,
0.4355687201023102,
0.674128532409668,
-0.16326196491718292,
-0.7631001472473145,
-0.05684497207403183,
0.32002127170562744,
-... |
func (tracer *Tracer) Count() int {
return len(tracer.traces)
} | [
1.0889747142791748,
-0.6294466853141785,
0.20305612683296204,
-0.3773297965526581,
0.30276525020599365,
0.6165236830711365,
0.95450758934021,
-0.23249216377735138,
0.21967817842960358,
0.02667853608727455,
-0.94740891456604,
-0.6147712469100952,
0.1324843317270279,
1.4312896728515625,
0.... |
func (tracer *Tracer) Clear() {
tracer.traces = nil
} | [
0.9564498066902161,
-0.02897338755428791,
-0.0987662598490715,
-0.104684017598629,
0.3251815438270569,
1.2299540042877197,
0.5652106404304504,
-0.7285980582237244,
0.6936363577842712,
-0.09785164147615433,
0.14280903339385986,
0.3902377188205719,
0.0647730752825737,
1.2686222791671753,
-... |
func (tracer *Tracer) Add(ctx context.Context, start *wire.OutPoint) {
newNode := traceNode{
outpoint: *start,
}
tracer.traces = append(tracer.traces, &newNode)
} | [
0.148784339427948,
-0.6013939380645752,
0.4049927294254303,
-0.03269006684422493,
0.3892538249492645,
0.6250500679016113,
-0.11399094760417938,
-0.3919418454170227,
0.9469873309135437,
0.3412610590457916,
-0.08948515355587006,
0.9470899701118469,
-0.6776337027549744,
0.08142638951539993,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.