text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func EnqueueClusterScopedObjectWithSeedName(seedName string) *handler.EnqueueRequestsFromMapFunc {
return &handler.EnqueueRequestsFromMapFunc{ToRequests: handler.ToRequestsFunc(func(a handler.MapObject) []reconcile.Request {
if a.Meta.GetNamespace() != "" {
utilruntime.HandleError(fmt.Errorf("EnqueueClusterScoped... | [
0.24878013134002686,
-0.6321589350700378,
0.6898913383483887,
-0.033908870071172714,
-0.8792481422424316,
-0.027363866567611694,
0.3363259732723236,
-1.046660304069519,
0.8535074591636658,
0.5424166917800903,
-0.26971468329429626,
0.8536859750747681,
0.8563670516014099,
0.8472200036048889,... |
func EnqueueConst(queueKey string) *handler.EnqueueRequestsFromMapFunc {
if queueKey == "" {
queueKey = "const"
}
return &handler.EnqueueRequestsFromMapFunc{ToRequests: handler.ToRequestsFunc(func(o handler.MapObject) []reconcile.Request {
return []reconcile.Request{
{NamespacedName: types.NamespacedName{
... | [
0.03185223415493965,
-0.45371493697166443,
0.7018020153045654,
-0.34749552607536316,
-0.17535020411014557,
0.18811145424842834,
-0.7797254920005798,
-0.10598843544721603,
-0.22107943892478943,
0.37959420680999756,
-0.2586047351360321,
0.11621277779340744,
0.2510868012905121,
1.044549822807... |
func SupportsFailureDomainZoneAntiAffinity(ctx context.Context, client ctrlruntimeclient.Client) (bool, error) {
selector, err := labels.Parse(resources.TopologyKeyFailureDomainZone)
if err != nil {
return false, fmt.Errorf("failed to parse selector: %v", err)
}
opts := &ctrlruntimeclient.ListOptions{
LabelSele... | [
-0.9862135052680969,
-0.1980205625295639,
0.11225935071706772,
-0.27536332607269287,
0.5268268585205078,
-0.05673501640558243,
0.22169345617294312,
0.21907857060432434,
0.13817808032035828,
-0.03324360400438309,
-0.19424037635326385,
-0.43171897530555725,
-0.7106805443763733,
0.40514558553... |
func ClusterAvailableForReconciling(ctx context.Context, client ctrlruntimeclient.Client, cluster *kubermaticv1.Cluster, concurrencyLimit int) (bool, error) {
if !cluster.Status.HasConditionValue(kubermaticv1.ClusterConditionSeedResourcesUpToDate, corev1.ConditionTrue) {
return true, nil
}
limitReached, err := Co... | [
-0.5038927793502808,
0.31805220246315,
0.5661124587059021,
-0.5741865038871765,
-0.11273011565208435,
-0.2751103341579437,
0.3414735496044159,
1.274924635887146,
-0.11077512055635452,
0.469913512468338,
0.5281845331192017,
-0.011846035718917847,
-0.12743550539016724,
-0.31898537278175354,
... |
func ConcurrencyLimitReached(ctx context.Context, client ctrlruntimeclient.Client, limit int) (bool, error) {
clusters := &kubermaticv1.ClusterList{}
if err := client.List(ctx, clusters); err != nil {
return true, fmt.Errorf("failed to list clusters: %v", err)
}
finishedUpdatingClustersCount := 0
for _, cluster... | [
-0.6581910252571106,
-0.20164857804775238,
0.7128268480300903,
-0.11445139348506927,
-0.24305304884910583,
0.2542811334133148,
0.32722213864326477,
0.6255485415458679,
-0.2428823560476303,
0.5773647427558899,
-0.3815526068210602,
0.06137804687023163,
-1.1653722524642944,
-0.248913004994392... |
func IsCacheNotStarted(err error) bool {
if err == nil {
return false
}
_, ok := err.(*cache.ErrCacheNotStarted)
return ok
} | [
-0.5779542922973633,
-0.5660009980201721,
0.2574974000453949,
0.5636698007583618,
-0.3347446322441101,
0.08710530400276184,
0.10523522645235062,
-0.04776248708367348,
0.5916593074798584,
0.224063903093338,
-0.33322155475616455,
0.18232564628124237,
0.26598694920539856,
1.0859081745147705,
... |
func NewBinary(left Expr, op *token.T, right Expr) *Binary {
return &Binary{
Left: left,
Operator: op,
Right: right,
}
} | [
0.1696578711271286,
-0.7684800624847412,
0.5652024149894714,
1.1193015575408936,
-0.6503772735595703,
-0.2301701307296753,
-1.2762023210525513,
-0.6513400673866272,
-0.8955473303794861,
-0.006776411086320877,
-0.3003566563129425,
0.5543200373649597,
-0.3241640627384186,
-0.1122853532433509... |
func (b *Binary) Accept(v Visitor) {
v.VisitBinary(b)
} | [
-0.8609430193901062,
0.17144325375556946,
0.49495989084243774,
0.47617921233177185,
-0.49701207876205444,
0.7846905589103699,
1.5777279138565063,
0.005017179064452648,
-0.553945004940033,
0.3941646218299866,
-0.2669030725955963,
0.5656943321228027,
-0.1164771169424057,
1.103060007095337,
... |
func NewSQL() DatabaseAccess {
sql := SQLdb{db: openDatabaseConnection()}
return &sql
} | [
0.7937610745429993,
-0.6573306918144226,
0.28632062673568726,
0.458418071269989,
-1.922196388244629,
0.1576526015996933,
-0.7601980566978455,
-0.030669843778014183,
0.4496457278728485,
-0.38026759028434753,
0.3317735493183136,
-0.04516641050577164,
0.38396722078323364,
0.5420474410057068,
... |
func (r *WebACL_ResponseInspectionJson) AWSCloudFormationType() string {
return "AWS::WAFv2::WebACL.ResponseInspectionJson"
} | [
0.8015817403793335,
0.060817454010248184,
0.39418840408325195,
-0.24002094566822052,
0.024452364072203636,
-0.04012606665492058,
0.5629010796546936,
-0.7773022055625916,
0.42221346497535706,
-0.141434445977211,
-0.4263554513454437,
0.44519105553627014,
0.9048032760620117,
0.786454021930694... |
func NewTask(ctx *pulumi.Context,
name string, args *TaskArgs, opts ...pulumi.ResourceOption) (*Task, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.QueueId == nil {
return nil, errors.New("invalid value for required argument 'QueueId'")
}
replaceOnChange... | [
0.24653178453445435,
0.6511945724487305,
0.41741207242012024,
-0.0898456946015358,
0.1421910971403122,
0.595146656036377,
-0.5356306433677673,
0.07517149299383163,
-0.11560363322496414,
0.4802584946155548,
-0.8683321475982666,
0.5242199301719666,
0.3295571506023407,
0.14811046421527863,
... |
func GetTask(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *TaskState, opts ...pulumi.ResourceOption) (*Task, error) {
var resource Task
err := ctx.ReadResource("google-native:cloudtasks/v2:Task", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
} | [
0.3863949477672577,
0.4006385803222656,
0.11082804948091507,
0.39664357900619507,
0.5918459892272949,
0.21583598852157593,
-0.28308722376823425,
-0.10058248788118362,
0.4533955752849579,
-0.0002826081763487309,
-0.5269861817359924,
0.8955004215240479,
0.7589958906173706,
-1.026919007301330... |
func (o TaskOutput) AppEngineHttpRequest() AppEngineHttpRequestResponseOutput {
return o.ApplyT(func(v *Task) AppEngineHttpRequestResponseOutput { return v.AppEngineHttpRequest }).(AppEngineHttpRequestResponseOutput)
} | [
-0.2549813687801361,
-0.3065997064113617,
0.7653338313102722,
0.17178601026535034,
-0.39115360379219055,
0.31148162484169006,
-0.24234509468078613,
0.02843586727976799,
-0.6069693565368652,
-0.363872230052948,
0.3091162443161011,
-0.1605825275182724,
1.3501036167144775,
0.25348421931266785... |
func (o TaskOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v *Task) pulumi.StringOutput { return v.CreateTime }).(pulumi.StringOutput)
} | [
0.751958966255188,
0.03588660806417465,
0.5678799152374268,
-0.1445668488740921,
0.49219539761543274,
0.850977897644043,
-0.026468075811862946,
-0.09356403350830078,
-0.38362574577331543,
0.6041427850723267,
-0.4080430567264557,
-0.24702990055084229,
0.7909693717956543,
-0.564193844795227,... |
func (o TaskOutput) DispatchCount() pulumi.IntOutput {
return o.ApplyT(func(v *Task) pulumi.IntOutput { return v.DispatchCount }).(pulumi.IntOutput)
} | [
0.5945947170257568,
0.847062885761261,
0.7057462930679321,
-0.08808007091283798,
0.14194053411483765,
0.3077336251735687,
0.9470856785774231,
0.8956356048583984,
0.15289656817913055,
-1.1069039106369019,
-1.2619249820709229,
0.19203472137451172,
1.662857174873352,
-0.8258732557296753,
-0... |
func (o TaskOutput) DispatchDeadline() pulumi.StringOutput {
return o.ApplyT(func(v *Task) pulumi.StringOutput { return v.DispatchDeadline }).(pulumi.StringOutput)
} | [
0.5115008354187012,
-0.1698317527770996,
0.8024331331253052,
-0.14709416031837463,
0.2032921314239502,
0.9862694144248962,
-0.18555627763271332,
0.2982923984527588,
0.21968507766723633,
-0.4668780565261841,
-0.41917112469673157,
0.18957512080669403,
1.7948081493377686,
-0.9141467213630676,... |
func (o TaskOutput) FirstAttempt() AttemptResponseOutput {
return o.ApplyT(func(v *Task) AttemptResponseOutput { return v.FirstAttempt }).(AttemptResponseOutput)
} | [
0.3715679943561554,
-0.48465266823768616,
0.5660709738731384,
-0.4200672507286072,
-0.22283361852169037,
-0.5023695826530457,
1.4149705171585083,
-0.8034533262252808,
0.5558596849441528,
-0.7830871939659119,
0.428139328956604,
-0.35641875863075256,
0.7106052041053772,
-0.2290751039981842,
... |
func (o TaskOutput) HttpRequest() HttpRequestResponseOutput {
return o.ApplyT(func(v *Task) HttpRequestResponseOutput { return v.HttpRequest }).(HttpRequestResponseOutput)
} | [
-0.4977843463420868,
-0.35681045055389404,
0.7537318468093872,
0.004167395643889904,
-0.4846786558628082,
0.17664459347724915,
0.6052766442298889,
-0.19854673743247986,
0.24296993017196655,
-0.32524779438972473,
0.48327475786209106,
0.7408590316772461,
1.2519659996032715,
-0.41914749145507... |
func (o TaskOutput) LastAttempt() AttemptResponseOutput {
return o.ApplyT(func(v *Task) AttemptResponseOutput { return v.LastAttempt }).(AttemptResponseOutput)
} | [
0.07217361032962799,
-0.8549356460571289,
0.7776997089385986,
-0.9793731570243835,
-0.31119316816329956,
-0.30611881613731384,
1.4742997884750366,
-0.6587615013122559,
0.9438109397888184,
-0.3356185555458069,
0.49807116389274597,
-0.5902512073516846,
0.3784472942352295,
-0.8278180360794067... |
func (o TaskOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Task) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
} | [
0.3708368241786957,
-0.42435044050216675,
0.5338634252548218,
0.3131922781467438,
-0.9191170930862427,
0.2678334414958954,
0.6948816180229187,
0.08611238747835159,
-0.515618622303009,
0.4401567578315735,
-0.353354275226593,
0.23972731828689575,
1.5660271644592285,
-0.654263436794281,
-0.... |
func (o TaskOutput) ResponseCount() pulumi.IntOutput {
return o.ApplyT(func(v *Task) pulumi.IntOutput { return v.ResponseCount }).(pulumi.IntOutput)
} | [
0.6776543259620667,
0.02788868360221386,
0.6409571170806885,
-0.15213564038276672,
0.052460432052612305,
0.41854432225227356,
1.3431025743484497,
0.18671047687530518,
0.2283065766096115,
-1.6391390562057495,
-0.48784756660461426,
0.14182230830192566,
0.8755474090576172,
-1.203355073928833,... |
func (o TaskOutput) ScheduleTime() pulumi.StringOutput {
return o.ApplyT(func(v *Task) pulumi.StringOutput { return v.ScheduleTime }).(pulumi.StringOutput)
} | [
0.10723954439163208,
-0.04269704967737198,
0.5616907477378845,
0.06302374601364136,
-0.19520394504070282,
0.6534581780433655,
-0.6415162086486816,
0.38795775175094604,
-0.10580169409513474,
0.693598747253418,
0.051108039915561676,
-0.16844776272773743,
0.5860072374343872,
-1.15190148353576... |
func (o TaskOutput) View() pulumi.StringOutput {
return o.ApplyT(func(v *Task) pulumi.StringOutput { return v.View }).(pulumi.StringOutput)
} | [
0.7042904496192932,
0.3711196184158325,
0.5515463948249817,
-0.681088387966156,
-0.5862679481506348,
0.0777900293469429,
0.7343519330024719,
-0.16896629333496094,
-0.07252790033817291,
-0.9277396202087402,
0.6846869587898254,
0.9238064289093018,
1.327850580215454,
-1.0116227865219116,
-1... |
func NewStorageServiceRequestHandler() *StorageServiceRequestHandler {
return &StorageServiceRequestHandler{
Invoker: server.NewInvoker(),
}
} | [
-0.7611028552055359,
-1.0252578258514404,
-0.09714868664741516,
1.3960044384002686,
-0.3217499554157257,
-0.36129334568977356,
-0.690115749835968,
-0.6160363554954529,
-0.8812130689620972,
-1.2589935064315796,
0.3435863256454468,
0.16722965240478516,
-0.5974282622337341,
0.0068501359783113... |
func (r *StorageServiceRequestHandler) HandleInvokeRequest(writer http.ResponseWriter, request *http.Request) {
output := r.Invoker.Invoke(request)
writer.Header().Set("Content-Type", "service/json; charset=utf-8")
writer.Write(output)
} | [
-0.7885429263114929,
-0.9001603722572327,
0.5825926065444946,
0.027509042993187904,
-0.04731325805187225,
-0.9233316779136658,
-0.38113611936569214,
-0.19516132771968842,
-0.8174103498458862,
-0.1847054809331894,
0.2511967122554779,
0.3016965091228485,
-0.4865325689315796,
0.51910430192947... |
func NewPingSource(name, namespace string, o ...PingSourceOption) *v1.PingSource {
c := &v1.PingSource{
ObjectMeta: metav1.ObjectMeta{
Name: name,
Namespace: namespace,
},
}
for _, opt := range o {
opt(c)
}
c.SetDefaults(context.Background()) // TODO: We should add defaults and validation.
return... | [
-0.48212411999702454,
0.17030897736549377,
0.21360352635383606,
0.20982018113136292,
-0.21687591075897217,
-0.4889099597930908,
-0.7124746441841125,
0.16242273151874542,
0.610463559627533,
0.7152851819992065,
-1.116516351699829,
-0.17194755375385284,
-0.29017800092697144,
-0.27321550250053... |
func (r *BlueprintReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
ctx := context.Background()
log := r.Log.WithValues("blueprint", req.NamespacedName)
var err error
blueprint := app.Blueprint{}
if err := r.Get(ctx, req.NamespacedName, &blueprint); err != nil {
return ctrl.Result{}, client.IgnoreN... | [
-0.15788152813911438,
-0.5028936862945557,
0.9902953505516052,
0.5510713458061218,
0.7851300239562988,
-0.3050679862499237,
-0.3199818432331085,
-0.06405922025442123,
-0.11572930216789246,
0.31659433245658875,
0.5548456311225891,
0.36772778630256653,
-1.4181996583938599,
0.9287272691726685... |
func NewBlueprintReconciler(mgr ctrl.Manager, name string, helmer helm.Interface) *BlueprintReconciler {
return &BlueprintReconciler{
Client: mgr.GetClient(),
Name: name,
Log: ctrl.Log.WithName("controllers").WithName(name),
Scheme: mgr.GetScheme(),
Helmer: helmer,
}
} | [
0.16455169022083282,
-1.1780554056167603,
0.40400856733322144,
-1.0813767910003662,
-0.9572003483772278,
-0.9864999055862427,
-0.5586236715316772,
1.1824254989624023,
-0.6069046854972839,
-0.33748680353164673,
0.12419107556343079,
0.558820366859436,
-0.8607510924339294,
0.521943986415863,
... |
func (r *BlueprintReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
For(&app.Blueprint{}).
Complete(r)
} | [
0.2682056725025177,
-0.2556595206260681,
0.5459395051002502,
-0.5841159224510193,
-0.09240641444921494,
-0.7952978014945984,
0.2720855474472046,
-0.3959003984928131,
-0.17423130571842194,
-0.04251210018992424,
0.11185861378908157,
-0.511124849319458,
-0.45723485946655273,
1.363474726676941... |
func CloudLoggingOpt() Opt {
return &cloudLoggingInitOpt{}
} | [
0.6350131630897522,
0.42695099115371704,
0.4695356786251068,
0.1551320105791092,
0.03670571371912956,
0.2929748594760895,
-0.09597060084342957,
-0.18400077521800995,
-0.39880767464637756,
0.1925588995218277,
-0.8215924501419067,
0.27947068214416504,
-0.44758346676826477,
-0.311922043561935... |
func CloudLoggingJWTOpt(serviceAccountPath *string) Opt {
return &cloudLoggingInitOpt{
serviceAccountPath: serviceAccountPath,
}
} | [
0.7119308114051819,
0.14329929649829865,
0.49537843465805054,
-0.48610731959342957,
-0.45846742391586304,
0.28661420941352844,
0.01552901417016983,
-0.7753182053565979,
-0.05231818929314613,
0.3847293257713318,
-0.129720538854599,
1.1079272031784058,
-0.3012092411518097,
-0.075451917946338... |
func PrometheusOpt(port *string) Opt {
return &promInitOpt{
port: port,
}
} | [
0.7166413068771362,
0.1434497982263565,
0.26958218216896057,
-0.6174284219741821,
-0.054062921553850174,
0.8180411458015442,
-0.20037245750427246,
-0.90936279296875,
-0.20399418473243713,
0.14912261068820953,
-0.1795058399438858,
0.6695467829704285,
-0.8353360295295715,
-0.8619835376739502... |
func InitWith(appName string, opts ...Opt) error {
// Add baseInitOpt.
opts = append(opts, &baseInitOpt{})
// Sort by order().
sort.Sort(optSlice(opts))
// Check for duplicate Opts.
for i := 0; i < len(opts)-1; i++ {
if opts[i].order() == opts[i+1].order() {
return fmt.Errorf("Only one of each type of Opt... | [
-0.454780638217926,
-0.06862929463386536,
0.7857984304428101,
1.1917475461959839,
-0.33269062638282776,
-0.1953357458114624,
-0.21228930354118347,
-1.0161913633346558,
0.2506781816482544,
0.6787117719650269,
0.04270058870315552,
0.6485474705696106,
-0.1997174620628357,
0.3309382498264313,
... |
func InitWithMust(appName string, opts ...Opt) {
if err := InitWith(appName, opts...); err != nil {
sklog.Fatalf("Failed to initialize: %s", err)
}
} | [
-0.19562402367591858,
0.14192138612270355,
0.7965983748435974,
0.26802557706832886,
-0.4594903290271759,
0.38720375299453735,
-0.9902926683425903,
-0.6432251334190369,
0.8054312467575073,
0.57940274477005,
-0.4219292104244232,
0.9279524087905884,
0.2832421064376831,
0.4172733724117279,
0... |
func SetSettingsFromViper() {
Environment = getEnvironment()
glog.Info("We're in our the following environment: ", Environment)
// SetENV if not in a production environment
// Check for local
if Environment != AppEnvironmentProduction && Environment != AppEnvironmentStaging {
setEnvironmentVariablesFromConfig(En... | [
-0.24398639798164368,
-0.20586825907230377,
0.9184719324111938,
0.3402714431285858,
0.7618851661682129,
0.1200806275010109,
-0.05376628413796425,
-0.29145774245262146,
-0.6278004050254822,
0.5068555474281311,
-0.34753507375717163,
0.33276668190956116,
-0.48671475052833557,
0.84032654762268... |
func (*RunStatisByUserIdReq) Descriptor() ([]byte, []int) {
return file_MsgPush_proto_rawDescGZIP(), []int{0}
} | [
-1.2734472751617432,
0.3655071556568146,
0.16966748237609863,
0.37726905941963196,
0.07000166922807693,
-0.04831359535455704,
0.11371538043022156,
0.018164511770009995,
-0.7502894997596741,
-0.571404218673706,
-0.5198870897293091,
1.1350106000900269,
0.19186735153198242,
0.9394819140434265... |
func (*RunStatisByUserIdResp) Descriptor() ([]byte, []int) {
return file_MsgPush_proto_rawDescGZIP(), []int{1}
} | [
0.18972577154636383,
-0.4065284729003906,
-0.09752415865659714,
0.08802039921283722,
-0.12843386828899384,
-0.0014774687588214874,
0.15972737967967987,
-0.7888067364692688,
0.09808309376239777,
-0.2419176995754242,
-0.776364266872406,
0.40250787138938904,
-0.32438135147094727,
0.1500582396... |
func EventStringBond() string { return "Bond" } | [
1.198112964630127,
-1.4725399017333984,
0.5868269205093384,
0.08677981793880463,
-0.15226978063583374,
1.1004148721694946,
-0.19903796911239624,
-0.2609938681125641,
0.060433413833379745,
-0.40716952085494995,
0.30117207765579224,
0.6222823858261108,
-0.5249687433242798,
-0.093020953238010... |
func fireEvent(fireable events.Fireable, event string, data TMEventData) {
if fireable != nil {
fireable.FireEvent(event, data)
}
} | [
0.6665990352630615,
0.13873273134231567,
0.24767138063907623,
0.5594061017036438,
-0.05783507227897644,
0.08720385283231735,
-0.3228831887245178,
1.148118495941162,
-0.09651512652635574,
-0.5835546255111694,
-0.9005403518676758,
-0.23218460381031036,
0.08841314911842346,
0.6599488258361816... |
func FireEventNewBlock(fireable events.Fireable, block EventDataNewBlock) {
fireEvent(fireable, EventStringNewBlock(), block)
} | [
-0.14594322443008423,
-0.5689958930015564,
0.43550074100494385,
1.0465614795684814,
-0.5582551956176758,
-0.27945852279663086,
-0.8792291879653931,
-0.2755143642425537,
-0.6854647397994995,
-0.4841346740722656,
-1.3300446271896362,
0.4133642315864563,
0.4372778534889221,
0.8527851700782776... |
func DecodeStore(cdc *codec.Codec, kvA, kvB tmkv.Pair) string {
switch {
case bytes.Equal(kvA.Key[:1], types.GrantKey):
var grantA, grantB types.AuthorizationGrant
cdc.MustUnmarshalBinaryLengthPrefixed(kvA.Value, &grantA)
cdc.MustUnmarshalBinaryLengthPrefixed(kvB.Value, &grantB)
return fmt.Sprintf("%v\n%v", g... | [
-0.11324365437030792,
-0.5000393390655518,
0.4330047369003296,
-0.6420505046844482,
-1.1157177686691284,
-0.6083226799964905,
-0.0959383025765419,
-0.4593159258365631,
0.1337931901216507,
-0.03585733845829964,
0.9893943667411804,
0.5468118786811829,
-0.4892880320549011,
0.1252112090587616,... |
func createUrlQuery(testHistoryParameters model.TestHistoryParameters) string {
queryString := fmt.Sprintf("testStatuses=%s&taskStatuses=%s",
strings.Join(testHistoryParameters.TestStatuses, ","),
strings.Join(testHistoryParameters.TaskStatuses, ","),
)
if testHistoryParameters.TaskRequestType != "" {
querySt... | [
0.20257185399532318,
-0.48342156410217285,
0.5927966237068176,
-0.6365137696266174,
0.3431796729564667,
0.32035955786705017,
-0.3261530101299286,
0.07484380900859833,
-0.21048898994922638,
0.2910946309566498,
0.7729122042655945,
0.8377906084060669,
-0.38313302397727966,
0.9285463094711304,... |
func (thc *TestHistoryCommand) Execute(_ []string) error {
_, rc, _, err := getAPIClients(thc.GlobalOpts)
if err != nil {
return err
}
// convert the test and tasks statuses to the correct evergreen statuses
testStatuses := []string{}
for _, s := range thc.TestStatuses {
switch s {
case "pass":
testStat... | [
-0.10040979087352753,
-0.3623349368572235,
0.9305919408798218,
-0.0953228697180748,
0.7689106464385986,
0.3179040849208832,
-0.06690505146980286,
0.04134770855307579,
-0.9287744164466858,
0.4387038052082062,
0.2615971863269806,
0.15546950697898865,
-0.052654121071100235,
0.1012416854500770... |
func (config *SysConfig) IsDifferentConfig(origin *SysConfig) bool {
if strings.EqualFold(config.Host, origin.Host) && strings.EqualFold(config.Auth, origin.Auth) &&
strings.EqualFold(config.Healthz, origin.Healthz) {
return false
}
return true
} | [
-0.7160056233406067,
-0.5122329592704773,
0.571358323097229,
0.8203308582305908,
0.0909464880824089,
1.1481767892837524,
-0.32970818877220154,
0.19719523191452026,
0.09922981262207031,
-0.20050282776355743,
-1.166808843612671,
0.40074580907821655,
-0.34747597575187683,
1.4634225368499756,
... |
func NewHealth() *Health {
return NewHealthOnPort(healthPort)
} | [
1.4347988367080688,
-1.0491405725479126,
0.16043509542942047,
1.1808359622955322,
-0.6952099800109863,
0.7185080647468567,
0.20967765152454376,
-0.8041179180145264,
0.5457093119621277,
-1.0516003370285034,
0.2291053831577301,
0.43048977851867676,
-0.4301309585571289,
-0.16999386250972748,
... |
func NewHealthOnPort(port int) *Health {
healthMux := http.NewServeMux()
healthMux.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, "OK") })
server := &http.Server{Addr: ":" + strconv.Itoa(port), Handler: healthMux}
interrupts.ListenAndServe(server, 5*time.Second)
return &Health{... | [
0.09450546652078629,
-1.3422011137008667,
0.7321147918701172,
-0.3317232131958008,
-0.9897142052650452,
0.7605240941047668,
-0.3909819722175598,
-0.6229491829872131,
0.22609208524227142,
-0.6584067344665527,
-0.5498539805412292,
0.17178788781166077,
-0.6965203881263733,
0.1632699817419052,... |
func (h *Health) ServeReady(readynessChecks ...ReadynessCheck) {
h.healthMux.HandleFunc("/healthz/ready", func(w http.ResponseWriter, r *http.Request) {
for _, readynessCheck := range readynessChecks {
if !readynessCheck() {
w.WriteHeader(http.StatusServiceUnavailable)
fmt.Fprint(w, "ReadynessCheck failed... | [
-0.9840340614318848,
-0.34478825330734253,
0.7258282899856567,
0.28473731875419617,
0.9913405776023865,
0.3294573128223419,
-0.07043768465518951,
-0.00912989117205143,
-0.49768078327178955,
0.05580391734838486,
-0.26694396138191223,
0.613064169883728,
-0.10649484395980835,
0.87479895353317... |
func countSwaps(a []int32) []int32 {
var number int
for i := len(a); i > 0; i-- {
for j := 0; j < i-1; j++ {
if a[j] > a[j+1] {
toSwap := a[j]
a[j] = a[j+1]
a[j+1] = toSwap
number++
}
}
}
// for i := 0; i < len(a); i++ {
// for j := 0; j < (len(a) - 1); j++ {
// if a[j] > a[j+1] {
... | [
-0.1163749173283577,
-0.2714948058128357,
1.0800678730010986,
-0.2869378328323364,
-0.6217029690742493,
0.4932750165462494,
1.405427098274231,
0.13470014929771423,
1.0049660205841064,
-0.7176766991615295,
0.18116827309131622,
0.4753626585006714,
0.21566413342952728,
0.7376542687416077,
0... |
func NewMetaData(clientID UUID, clientMessageNumber uint64, transactionID UUID) MetaData {
md := make(MetaData, fb.SizeUint64*3)
fb.WriteUint64(md[0:fb.SizeUint64], uint64(clientID))
fb.WriteUint64(md[fb.SizeUint64:fb.SizeUint64*2], clientMessageNumber)
fb.WriteUint64(md[fb.SizeUint64*2:fb.SizeUint64*3], uint64(tra... | [
1.0442262887954712,
0.1287229359149933,
0.4778812825679779,
-0.45496615767478943,
0.2204582840204239,
-0.09846889227628708,
-0.12039171904325485,
-0.5471662282943726,
-0.4334527850151062,
0.3364975154399872,
0.295189768075943,
0.5864807367324829,
-0.8388490080833435,
-0.14622704684734344,
... |
func (m MetaData) ClientID() UUID {
return UUID(fb.GetUint64(m[0:fb.SizeUint64]))
} | [
0.5956662893295288,
-0.49227800965309143,
0.1311078518629074,
0.08519991487264633,
0.343781977891922,
0.761843204498291,
0.7366708517074585,
-0.010490941815078259,
-0.28584811091423035,
0.6804454326629639,
0.7065951228141785,
0.8981321454048157,
-0.28828176856040955,
-0.8873826861381531,
... |
func (m MetaData) ClientMessageNumber() uint64 {
return fb.GetUint64(m[fb.SizeUint64 : fb.SizeUint64*2])
} | [
-0.2783966660499573,
0.16032788157463074,
0.5247468948364258,
-0.3233388364315033,
0.29329216480255127,
-0.6531469225883484,
0.8162144422531128,
-0.5109038949012756,
-0.6938926577568054,
-0.24910414218902588,
-0.47095632553100586,
-0.20991790294647217,
-0.002250303979963064,
0.766507863998... |
func (m MetaData) TransactionID() UUID {
return UUID(fb.GetUint64(m[fb.SizeUint64*2 : fb.SizeUint64*3]))
} | [
1.031152606010437,
0.36686041951179504,
0.3212457597255707,
0.013212008401751518,
0.3809451162815094,
0.4434090852737427,
0.33677196502685547,
0.22537773847579956,
0.35836440324783325,
1.0485907793045044,
0.3613665997982025,
-0.20397403836250305,
-0.41988006234169006,
-0.5155214667320251,
... |
func FromUnparsedImage(ctx context.Context, sys *types.SystemContext, unparsed *UnparsedImage) (types.Image, error) {
return image.FromUnparsedImage(ctx, sys, unparsed)
} | [
0.08889449387788773,
-0.2507168650627136,
0.25616326928138733,
-0.41308245062828064,
-0.4346264600753784,
0.24723996222019196,
0.3378373980522156,
0.3440171182155609,
0.188274085521698,
-0.8764098882675171,
-0.07218239456415176,
0.7850515246391296,
-0.47572165727615356,
0.8758148550987244,... |
func Dbg(args ...interface{}) {
if !isDebugMode() {
return
}
message := formatMessage(args...)
printMessage(Debug, message)
} | [
0.10020684450864792,
0.5966631174087524,
0.8585822582244873,
0.2706567347049713,
0.8533948659896851,
0.2658769190311432,
-0.23402482271194458,
0.0007640101248398423,
-0.18294855952262878,
-0.015056045725941658,
1.2706646919250488,
0.7180578708648682,
-0.7826753854751587,
2.125673532485962,... |
func DbgIf(condition bool, args ...interface{}) {
if !condition || !isDebugMode() {
return
}
Dbg(args...)
} | [
0.1046990305185318,
1.547860860824585,
0.4190775156021118,
-0.1343085914850235,
0.6420972943305969,
0.2199273705482483,
0.17254294455051422,
0.7132169604301453,
-0.9076531529426575,
0.8180446028709412,
-0.24776077270507812,
0.045574016869068146,
-1.3908476829528809,
1.2348803281784058,
-... |
func DbgErr(err error, args ...interface{}) {
if err == nil || !isDebugMode() {
return
}
Err(err.Error())
Dbg(args...)
} | [
-0.47697731852531433,
0.6326552629470825,
0.4647619426250458,
0.1658082753419876,
0.3144589364528656,
-0.16401876509189606,
-0.7346767783164978,
0.17201131582260132,
-0.07465861737728119,
0.197048619389534,
0.2437266856431961,
0.20084382593631744,
-0.5703502893447876,
1.8983155488967896,
... |
func DbgF(format string, args ...interface{}) {
if !isDebugMode() {
return
}
message := fmt.Sprintf(format, args...)
Dbg(message)
} | [
0.04538252577185631,
0.7494679093360901,
0.6251472234725952,
-0.09644977003335953,
0.6294273734092712,
-0.5380367636680603,
-0.7084056735038757,
-0.05285683274269104,
-0.9080255031585693,
-0.6643458008766174,
0.4766068756580353,
0.3431950509548187,
-0.46088850498199463,
2.090174913406372,
... |
func DbgFIf(condition bool, format string, args ...interface{}) {
if !condition || !isDebugMode() {
return
}
DbgF(format, args...)
} | [
-0.10756941884756088,
0.7851393818855286,
0.42988714575767517,
0.31052759289741516,
0.373485803604126,
-0.16093161702156067,
-0.20068053901195526,
-0.17506203055381775,
-0.8381189107894897,
-0.3698062002658844,
0.014758565463125706,
0.3644171953201294,
-0.5319265127182007,
1.91123187541961... |
func DbgFErr(err error, format string, args ...interface{}) {
if err == nil || !isDebugMode() {
return
}
Err(err.Error())
DbgF(format, args...)
} | [
-0.1296394318342209,
0.31885865330696106,
0.473271906375885,
0.3134526312351227,
0.06285729259252548,
-0.6000974178314209,
-0.6018946766853333,
-0.097089022397995,
-0.19271482527256012,
-0.47727036476135254,
0.4540119171142578,
0.191961407661438,
-0.07685095816850662,
2.078108787536621,
... |
func DbgDump(prefix string, arg interface{}) {
if !isDebugMode() {
return
}
message := litter.Sdump(arg)
if prefix != "" {
message = formatMessage(prefix, arg)
}
printMessage(Debug, message)
} | [
-0.67668616771698,
0.9442024230957031,
0.695491373538971,
-0.5771185755729675,
0.11547324806451797,
-0.09835340082645416,
0.13967588543891907,
0.2734868824481964,
0.22343561053276062,
-0.12473628669977188,
0.46237999200820923,
0.9495998024940491,
-0.16083680093288422,
1.46699857711792,
0... |
func DbgDumpIf(condition bool, prefix string, arg interface{}) {
if !condition || !isDebugMode() {
return
}
DbgDump(prefix, arg)
} | [
-0.18944209814071655,
1.2970200777053833,
0.4091401994228363,
0.050544824451208115,
-0.13362158834934235,
-0.10600895434617996,
-0.11642436683177948,
0.12078168243169785,
0.04629965126514435,
0.37452244758605957,
0.4157702326774597,
0.5363578200340271,
-0.05037369951605797,
1.6777025461196... |
func DbgDumpErr(err error, prefix string, arg interface{}) {
if err == nil || !isDebugMode() {
return
}
Err(err.Error())
DbgDump(prefix, arg)
} | [
-0.6444959044456482,
0.3499221205711365,
0.38343071937561035,
0.09826479852199554,
-0.41437625885009766,
-0.37299615144729614,
-0.043585848063230515,
0.34076234698295593,
0.7573251724243164,
0.1525205820798874,
0.4000605344772339,
0.47048836946487427,
0.06956494599580765,
1.599766612052917... |
func DbgTrace(err error) {
if err == nil || !isDebugMode() {
return
}
message := formatMessage(GetTrace(err))
printMessage(Debug, message)
} | [
0.2853270173072815,
1.4192739725112915,
0.7402200698852539,
-0.1321648210287094,
0.6479688882827759,
-0.4794105291366577,
-0.5578958988189697,
-0.9536322951316833,
0.2617870271205902,
0.2865622043609619,
0.8451794981956482,
0.7191746830940247,
-0.623155415058136,
1.5085951089859009,
0.12... |
func (s *WritableStream) Write(p []byte, fin bool) (int, error) {
return s.s.Write(p)
} | [
-0.4647333323955536,
0.7016324400901794,
0.2946546971797943,
0.6590614914894104,
0.3075830042362213,
-0.026873357594013214,
0.804495096206665,
0.7602360248565674,
-0.5644499659538269,
0.391134113073349,
-0.3764076828956604,
0.02607494592666626,
-1.3164111375808716,
0.2715147137641907,
-0... |
func (s *WritableStream) WriteQuic(p []byte, fin bool) (int, error) {
n, err := s.s.Write(p)
if err != nil {
return n, err
}
if fin {
return n, s.s.Close()
}
return n, nil
} | [
-0.5723128318786621,
-0.5075719356536865,
0.6198967695236206,
-0.47387877106666565,
0.40824025869369507,
-0.6650344729423523,
0.997392475605011,
-0.03938472270965576,
-0.3065502345561981,
-0.27503570914268494,
-0.014261974021792412,
0.4033719003200531,
-0.7897272706031799,
-0.2264976054430... |
func (s *WritableStream) StreamID() uint64 {
return uint64(s.s.StreamID())
} | [
0.5571013689041138,
-0.4584457278251648,
0.30076485872268677,
0.7738552093505859,
-0.3557674288749695,
0.5618780851364136,
0.9725391268730164,
-0.026388155296444893,
1.1865513324737549,
-0.2076018750667572,
0.24397078156471252,
1.1427252292633057,
-0.44352686405181885,
1.1231539249420166,
... |
func (s *WritableStream) Close() error {
return s.s.Close()
} | [
0.23701608180999756,
-0.3927170932292938,
0.3724527060985565,
0.1640741378068924,
-0.73674476146698,
-0.12165544927120209,
0.7373896837234497,
-0.250895619392395,
-0.5863202810287476,
-0.7690284848213196,
0.6518418192863464,
0.9310512542724609,
-0.9344948530197144,
0.9971043467521667,
-0... |
func (s *WritableStream) SetWriteDeadline(t time.Time) error {
return s.s.SetWriteDeadline(t)
} | [
-0.9238311052322388,
-0.6110386252403259,
0.3482857942581177,
0.21424232423305511,
1.164814829826355,
0.1933407187461853,
0.186489075422287,
-0.4189179837703705,
-0.7173122763633728,
0.26286596059799194,
-0.42995527386665344,
-0.09820413589477539,
0.16298532485961914,
0.9577057957649231,
... |
func (s *WritableStream) Detach() quic.SendStream {
return s.s
} | [
1.3541076183319092,
-0.32647034525871277,
0.3019647002220154,
0.04494712874293327,
-0.7548286318778992,
-0.27166569232940674,
1.0734305381774902,
-0.6845347285270691,
0.10635742545127869,
-0.5470608472824097,
0.061628248542547226,
0.3600083291530609,
-0.5829288363456726,
0.2524130046367645... |
func EveryPtrTest() string {
return `
func TestEvery<FTYPE>Ptr(t *testing.T) {
// Test : every value in the list is even number
var v2 <TYPE> = 2
var v4 <TYPE> = 4
var v5 <TYPE> = 5
var v8 <TYPE> = 8
var v10 <TYPE> = 10
list1 := []*<TYPE>{&v8, &v2, &v10, &v4}
if !Every<FTYPE>Ptr(isEven<FTYPE>Ptr, list1) {
t.... | [
-0.2996450960636139,
-0.3425604999065399,
0.7610644102096558,
-0.494472861289978,
0.23593829572200775,
-0.19708149135112762,
-0.12333032488822937,
-0.5458088517189026,
0.2760144770145416,
0.2585667371749878,
0.22389885783195496,
0.0775035098195076,
-0.4547779858112335,
1.1658849716186523,
... |
func EveryPtrBoolTest() string {
return `
func TestEvery<FTYPE>Ptr(t *testing.T) {
var vt <TYPE> = true
// Test : every value in the list is either true or false
list1 := []*<TYPE>{&vt, &vt, &vt, &vt}
if !Every<FTYPE>Ptr(TruePtr, list1) {
t.Errorf("Every<FTYPE>Ptr failed. Expected=true, actual=false")
}
li... | [
-0.03460816666483879,
-0.18333220481872559,
0.5831922888755798,
0.2226928472518921,
0.27008119225502014,
0.8409263491630554,
0.03612808138132095,
-0.7835267186164856,
-0.6039154529571533,
0.22295309603214264,
0.28634384274482727,
0.2272409349679947,
-0.5613892674446106,
1.3636878728866577,... |
func Asset(name string) ([]byte, error) {
cannonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[cannonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
}
return a.bytes, nil
}
return nil, fmt.Errorf("Asset %s not foun... | [
-0.7961483001708984,
-1.2313168048858643,
0.633165180683136,
-0.6093899011611938,
-1.546921730041504,
-0.11101024597883224,
0.12971386313438416,
-1.3390334844589233,
-1.1358720064163208,
0.4855233430862427,
0.3090141713619232,
0.32495471835136414,
-0.6009681224822998,
-0.44264674186706543,... |
func MustAsset(name string) []byte {
a, err := Asset(name)
if err != nil {
panic("asset: Asset(" + name + "): " + err.Error())
}
return a
} | [
-0.012778956443071365,
0.11985661834478378,
0.4091298282146454,
-0.5268413424491882,
-0.8276715278625488,
0.4719155430793762,
-0.8186293840408325,
-1.5736604928970337,
0.16388541460037231,
0.6357062458992004,
-0.5354578495025635,
0.35693347454071045,
0.0057142809964716434,
-0.0248885955661... |
func AssetInfo(name string) (os.FileInfo, error) {
cannonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[cannonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
}
return a.info, nil
}
return nil, fmt.Errorf("Asset... | [
0.371969997882843,
-1.1052993535995483,
0.5630446076393127,
-0.922572672367096,
-1.356387734413147,
0.0033556853886693716,
0.6777529716491699,
-0.8006685972213745,
-1.2748286724090576,
0.3115358352661133,
0.2636086046695709,
0.26388120651245117,
0.0635773167014122,
-0.3988074064254761,
0... |
func AssetNames() []string {
names := make([]string, 0, len(_bindata))
for name := range _bindata {
names = append(names, name)
}
return names
} | [
-0.7293784618377686,
-0.8460342288017273,
0.7321816682815552,
-0.39323121309280396,
-0.48951536417007446,
0.7661203145980835,
-0.5028699636459351,
-0.8655748963356018,
-0.4145073890686035,
0.8099913597106934,
0.16903363168239594,
1.163049578666687,
-0.028152840211987495,
0.0342608317732811... |
func RestoreAsset(dir, name string) error {
data, err := Asset(name)
if err != nil {
return err
}
info, err := AssetInfo(name)
if err != nil {
return err
}
err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
if err != nil {
return err
}
err = ioutil.WriteFile(_filePath(dir, name), d... | [
0.3437124192714691,
-0.3622540235519409,
0.6770355701446533,
-1.2592030763626099,
-0.006139514967799187,
-0.04453148692846298,
-0.0072639440186321735,
-0.43950510025024414,
-0.20619122684001923,
-0.2510169744491577,
0.1784360408782959,
0.13568510115146637,
-0.23627112805843353,
-0.56985116... |
func RestoreAssets(dir, name string) error {
children, err := AssetDir(name)
// File
if err != nil {
return RestoreAsset(dir, name)
}
// Dir
for _, child := range children {
err = RestoreAssets(dir, filepath.Join(name, child))
if err != nil {
return err
}
}
return nil
} | [
0.42261892557144165,
0.30020031332969666,
0.5813396573066711,
-0.20641657710075378,
-0.23828908801078796,
-0.24414615333080292,
0.5739709138870239,
-0.029911456629633904,
0.06188219040632248,
-0.43923482298851013,
0.5113736987113953,
0.3275970220565796,
-0.6125145554542542,
0.0351656526327... |
func NewObexClient1() *ObexClient1 {
a := new(ObexClient1)
a.client = bluez.NewClient(
&bluez.Config{
Name: "org.bluez.obex",
Iface: "org.bluez.obex.Client1",
Path: "/org/bluez/obex",
Bus: bluez.SessionBus,
},
)
return a
} | [
-0.6255972981452942,
-1.0581406354904175,
0.18314987421035767,
0.5633872151374817,
-0.8107072710990906,
0.33711016178131104,
0.7205663919448853,
-0.29527175426483154,
-0.24592754244804382,
0.2986283600330353,
-0.20729570090770721,
0.8231546878814697,
-0.9720299243927002,
-0.324640512466430... |
func Print(a ...interface{}) {
_, err := fmt.Fprint(color.Output, a...)
exit.If(err)
} | [
0.2783328890800476,
0.3159819543361664,
0.4725995361804962,
0.6869439482688904,
0.15138524770736694,
0.17863737046718597,
-0.03132558614015579,
-1.2462003231048584,
-0.9791663289070129,
-0.728376567363739,
0.4589157998561859,
-0.2830318212509155,
0.07916132360696793,
0.5435544848442078,
... |
func Printf(format string, a ...interface{}) {
_, err := fmt.Fprintf(color.Output, format, a...)
exit.If(err)
} | [
0.20791080594062805,
-0.0581120029091835,
0.5040019154548645,
0.5149733424186707,
0.22837260365486145,
0.02174372971057892,
0.28779661655426025,
-0.623350977897644,
-0.8938643336296082,
-0.4939756393432617,
0.6120607852935791,
0.08033222705125809,
0.3423347771167755,
0.5883913040161133,
... |
func Println(a ...interface{}) {
_, err := fmt.Fprintln(color.Output, a...)
exit.If(err)
} | [
-0.0679149180650711,
0.003070458769798279,
0.6383096575737,
0.9089503288269043,
-0.15229959785938263,
-0.009941202588379383,
0.1419438123703003,
-0.7615395784378052,
-0.8367778062820435,
-0.6376277804374695,
-0.0640951618552208,
-0.2696349620819092,
0.6828212141990662,
0.479611873626709,
... |
func All() echo.Ports {
return echo.Ports{
HTTP,
GRPC,
HTTP2,
TCP,
HTTPS,
TCPServer,
AutoTCP,
AutoTCPServer,
AutoHTTP,
AutoGRPC,
AutoHTTPS,
HTTPInstance,
HTTPLocalHost,
TCPWorkloadOnly,
HTTPWorkloadOnly,
TCPForHTTP,
}
} | [
0.6336443424224854,
-0.43837493658065796,
0.6297202706336975,
1.2372663021087646,
0.24737167358398438,
0.8316149711608887,
0.396709144115448,
-0.18497028946876526,
-0.1230357363820076,
-0.5263786315917969,
-0.6315835118293762,
1.3595701456069946,
-0.433951199054718,
1.0411789417266846,
0... |
func Headless() echo.Ports {
all := All()
headlessPorts := make([]echo.Port, len(all))
for i, p := range all {
if !p.IsWorkloadOnly() {
p.ServicePort = p.WorkloadPort
}
headlessPorts[i] = p
}
return headlessPorts
} | [
0.19810451567173004,
-0.5941798090934753,
0.5451337099075317,
-0.10151739418506622,
-0.08690883964300156,
0.7586645483970642,
0.22211389243602753,
-1.2505924701690674,
0.5694499015808105,
-0.1100584864616394,
-0.8021068572998047,
0.8162006735801697,
-0.5784196257591248,
0.01279600895941257... |
func NewCallParams(scName, funName string, params ...interface{}) *CallParams {
return NewCallParamsFromDic(scName, funName, parseParams(params))
} | [
0.09047948569059372,
0.4851418137550354,
0.565731406211853,
0.8020551204681396,
-1.2634986639022827,
0.13651612401008606,
-1.7148560285568237,
-0.28742748498916626,
-0.490046888589859,
0.21772941946983337,
0.1241002157330513,
0.31098195910453796,
-0.5870655179023743,
0.5459665060043335,
... |
func (r *CallParams) WithTransfer(col colored.Color, amount uint64) *CallParams {
return r.WithTransfers(colored.Balances{col: amount})
} | [
0.32796162366867065,
0.30672189593315125,
0.46012258529663086,
-0.5680709481239319,
-0.1781899333000183,
0.07278181612491608,
-0.4872169494628906,
-2.1123123168945312,
-0.13247840106487274,
0.05806387960910797,
-0.3351881504058838,
-0.2896382808685303,
0.4124094843864441,
1.053186178207397... |
func (r *CallParams) WithTransfers(transfer colored.Balances) *CallParams {
r.transfer = transfer
return r
} | [
0.5537347793579102,
0.34723058342933655,
0.2933886647224426,
-0.9181792736053467,
0.11648942530155182,
0.9134286046028137,
-0.3953389823436737,
-1.7984973192214966,
0.6913281083106995,
-0.6289317011833191,
-0.15343382954597473,
-0.3719783127307892,
-0.0923290103673935,
1.464233636856079,
... |
func (r *CallParams) WithMint(targetAddress ledgerstate.Address, amount uint64) *CallParams {
r.mintAddress = targetAddress
r.mintAmount = amount
return r
} | [
0.7269537448883057,
-0.7619486451148987,
0.4686664938926697,
-1.519736409187317,
-0.15285784006118774,
0.10221491008996964,
-0.8947486877441406,
-1.0606697797775269,
1.0892351865768433,
0.19659724831581116,
0.3663749098777771,
1.062543272972107,
0.3812146484851837,
0.4121938645839691,
-0... |
func (r *CallParams) NewRequestOffLedger(keyPair *ed25519.KeyPair) *request.OffLedger {
ret := request.NewOffLedger(r.target, r.entryPoint, r.args).WithTransfer(r.transfer)
ret.Sign(keyPair)
return ret
} | [
-0.7827144861221313,
-0.13122113049030304,
0.40927350521087646,
-0.1407943069934845,
-1.1035051345825195,
-0.02351825125515461,
-0.8595190644264221,
-0.7508326768875122,
0.37829944491386414,
-0.05572270229458809,
0.9035734534263611,
0.4695492684841156,
-0.7189710140228271,
1.03358328342437... |
func toMap(params []interface{}) map[string]interface{} {
par := make(map[string]interface{})
if len(params) == 0 {
return par
}
if len(params)%2 != 0 {
panic("WithParams: len(params) % 2 != 0")
}
for i := 0; i < len(params)/2; i++ {
key, ok := params[2*i].(string)
if !ok {
panic("WithParams: string ex... | [
-0.6809927821159363,
-0.44434621930122375,
0.9714317917823792,
0.47584453225135803,
-0.6219834685325623,
-0.0031721864361315966,
0.04301759973168373,
-0.4858936667442322,
0.44317498803138733,
1.0245423316955566,
0.17900651693344116,
-0.13597172498703003,
0.1286579668521881,
-0.072692953050... |
func (ch *Chain) RequestFromParamsToLedger(req *CallParams, keyPair *ed25519.KeyPair) (*ledgerstate.Transaction, iscp.RequestID, error) {
if len(req.transfer) == 0 {
return nil, iscp.RequestID{}, xerrors.New("transfer can't be empty")
}
ch.Env.ledgerMutex.Lock()
defer ch.Env.ledgerMutex.Unlock()
if keyPair == ... | [
-0.22143518924713135,
-0.1835801750421524,
0.8091800808906555,
-0.4298596680164337,
-0.2890225052833557,
-0.28679344058036804,
-0.6025841236114502,
-0.4405559003353119,
0.5136674046516418,
0.006807881407439709,
0.5946683883666992,
0.637274444103241,
-0.3124990463256836,
0.7424543499946594,... |
func (ch *Chain) PostRequestSync(req *CallParams, keyPair *ed25519.KeyPair) (dict.Dict, error) {
_, ret, err := ch.PostRequestSyncTx(req, keyPair)
return ret, err
} | [
-1.7053732872009277,
0.48268309235572815,
0.4099807143211365,
0.5251516699790955,
-1.1120928525924683,
-0.572976291179657,
-0.8218852281570435,
-1.0087380409240723,
-0.21323789656162262,
-0.3006751537322998,
-0.6017163991928101,
0.48428481817245483,
-0.5781385898590088,
0.2483222335577011,... |
func (ch *Chain) callViewFull(req *CallParams) (dict.Dict, error) {
ch.runVMMutex.Lock()
defer ch.runVMMutex.Unlock()
vctx := viewcontext.New(ch.ChainID, ch.StateReader, ch.proc, ch.Log)
a, ok, err := req.args.SolidifyRequestArguments(ch.Env.blobCache)
if err != nil || !ok {
return nil, fmt.Errorf("solo.interna... | [
-0.10106704384088516,
0.08927503228187561,
0.70411616563797,
-0.011808007955551147,
-0.8093818426132202,
-0.6485479474067688,
-1.109635353088379,
-0.27843379974365234,
-0.25104838609695435,
0.44286131858825684,
0.18215791881084442,
0.3695976138114929,
-0.5938237309455872,
0.460034817457199... |
func (ch *Chain) CallView(scName, funName string, params ...interface{}) (dict.Dict, error) {
ch.Log.Infof("callView: %s::%s", scName, funName)
p := parseParams(params)
ch.runVMMutex.Lock()
defer ch.runVMMutex.Unlock()
vctx := viewcontext.New(ch.ChainID, ch.StateReader, ch.proc, ch.Log)
ch.StateReader.SetBasel... | [
-0.28617551922798157,
-0.13217920064926147,
0.6142966151237488,
-0.06923624128103256,
-1.1339365243911743,
-0.9187602996826172,
-1.4654368162155151,
-0.43141043186187744,
-0.6174736618995667,
-0.12241765111684799,
0.9641602635383606,
1.1843479871749878,
-0.5466893911361694,
-0.022129295393... |
func (ch *Chain) WaitForRequestsThrough(numReq int, maxWait ...time.Duration) bool {
maxw := 5 * time.Second
var deadline time.Time
if len(maxWait) > 0 {
maxw = maxWait[0]
}
deadline = time.Now().Add(maxw)
for {
mstats := ch.mempool.Info()
if mstats.InBufCounter == numReq && mstats.OutPoolCounter == numReq ... | [
-0.3656574487686157,
0.2494560033082962,
0.4134421646595001,
-0.3718219995498657,
-0.75532066822052,
0.6600425243377686,
-0.12462693452835083,
-0.9134076237678528,
-0.6008687019348145,
-1.1618232727050781,
-0.18592074513435364,
-0.06105830892920494,
-0.46873268485069275,
0.5541500449180603... |
func (ch *Chain) MempoolInfo() chain.MempoolInfo {
return ch.mempool.Info()
} | [
0.2537861466407776,
-0.9007142186164856,
0.44816237688064575,
-0.659700334072113,
-0.5115734934806824,
0.0056197140365839005,
-0.975047767162323,
-1.2306936979293823,
-0.6965690851211548,
0.1368284672498703,
-0.8673977255821228,
0.8190383911132812,
-0.29160910844802856,
0.1432362198829651,... |
func contractSyncInput(con *types.Contract) ContractValidationInput {
// prep the validation input to be synced
var cInput = ContractValidationInput{
Address: con.Address,
Name: &con.Name,
SourceCode: con.SourceCode,
OptimizeRuns: con.OptimizeRuns,
Optimized: con.IsOptimized,
}
// trans... | [
-0.09092462062835693,
-0.4211156666278839,
0.5335679650306702,
-0.0014248925726860762,
-0.7123147249221802,
0.5440570116043091,
0.47249752283096313,
0.06043148413300514,
0.390120267868042,
0.09715934097766876,
-0.5815009474754333,
0.046833306550979614,
-0.25929421186447144,
-0.291858732700... |
func constructMutationPayload(con *types.Contract) (bytes.Buffer, error) {
// prepare the payload
payload := struct {
Query string `json:"query"`
Variables map[string]interface{} `json:"variables,omitempty"`
}{
Query: contractSyncMutationQuery,
Variables: map[string]interface{}{
"sc": ... | [
-0.8832698464393616,
0.10483533143997192,
0.3625057637691498,
-0.5028796792030334,
-0.7539628744125366,
-0.5388968586921692,
-0.42202720046043396,
-0.3180350661277771,
0.2706621289253235,
0.3187589943408966,
-0.34232428669929504,
-0.2198089361190796,
0.2712925970554352,
-0.354788213968277,... |
func (rs *rootResolver) syncContract(con types.Contract) {
// no peers to sync against
if len(cfg.Server.Peers) <= 0 {
log.Debugf("no peers for contract validation syncing")
return
}
// construct the payload
payload, err := constructMutationPayload(&con)
if err != nil {
log.Errorf("can not construct the sy... | [
-0.3738965690135956,
0.004104631021618843,
0.5883063077926636,
0.2770906686782837,
-0.37150299549102783,
0.14849573373794556,
0.0033650528639554977,
0.0898076519370079,
-0.5256598591804504,
0.39401665329933167,
-0.11118517071008682,
0.547928512096405,
-0.2243221551179886,
0.950259506702423... |
func syncContractToPeer(payload *bytes.Buffer, peer string, origin string, wg *sync.WaitGroup) {
// log action
log.Debugf("syncing contract validation to %s from %s", peer, origin)
// make a context with predefined timeout, we don't use the cancel func callback
ctx, cancel := context.WithTimeout(context.Background... | [
-0.41654327511787415,
-0.11529436707496643,
1.0418379306793213,
-0.3223128318786621,
-0.3730434775352478,
0.43406444787979126,
-0.9769871830940247,
-0.40719279646873474,
-0.8099899888038635,
0.8605138659477234,
-0.002607390284538269,
0.3925487697124481,
-0.04734591767191887,
0.063848435878... |
func (m *Module) Build(s *system.System) {
r := s.CommandRouter
t, err := system.NewSubCommandRouter(`^config(\s|$)`, "config")
if err != nil {
log.Println(err)
return
}
t.Router.Prefix = "^"
r.AddSubrouter(t)
t.CommandRoute = &system.CommandRoute{
Name: "config",
Desc: "configures guild settings... | [
-0.3616025745868683,
0.06751689314842224,
0.39192909002304077,
0.05779305845499039,
0.8083034157752991,
0.07640894502401352,
0.055240217596292496,
0.3717270791530609,
-0.2914055585861206,
0.10007429867982864,
-0.49613797664642334,
0.9651063084602356,
-0.04960455745458603,
1.743030071258545... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.