text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (entity *MilitaryForeign) Valid() (bool, error) {
var stack model.ErrorStack
if ok, err := entity.List.Valid(); !ok {
stack.Append("MilitaryForeign", err)
}
return !stack.HasErrors(), stack
} | [
-0.1874828040599823,
0.12076834589242935,
0.5565884709358215,
-0.035711269825696945,
0.39081883430480957,
0.5044379830360413,
-0.5051688551902771,
0.2350921630859375,
-0.3675590753555298,
-0.2303851991891861,
0.37635284662246704,
-0.3450975716114044,
-0.11642450094223022,
0.865072727203369... |
func (entity *MilitaryForeign) Save(context *pg.DB, account int64) (int, error) {
entity.AccountID = account
var err error
listID, err := entity.List.Save(context, account)
if err != nil {
return listID, err
}
entity.ListID = listID
err = context.CreateTable(&MilitaryForeign{}, &orm.CreateTableOptions{
Tem... | [
-0.13348494470119476,
0.3360767662525177,
0.8060929179191589,
0.038708075881004333,
0.36808446049690247,
-0.05285821482539177,
0.6792684197425842,
0.19116346538066864,
0.2172388881444931,
0.11898177117109299,
-0.7667181491851807,
-0.1327468752861023,
-1.0737329721450806,
1.4791150093078613... |
func (entity *MilitaryForeign) Delete(context *pg.DB, account int64) (int, error) {
entity.AccountID = account
options := &orm.CreateTableOptions{
Temp: false,
IfNotExists: true,
}
var err error
if err = context.CreateTable(&MilitaryForeign{}, options); err != nil {
return entity.ID, err
}
if _, ... | [
0.8297838568687439,
0.562509298324585,
0.7955831289291382,
0.582756757736206,
0.3970896601676941,
-0.14426380395889282,
0.6693625450134277,
0.42854979634284973,
0.669991135597229,
0.22596564888954163,
0.7046102285385132,
-0.04031003266572952,
-1.056448221206665,
1.222633719444275,
-0.042... |
func (entity *MilitaryForeign) Get(context *pg.DB, account int64) (int, error) {
entity.AccountID = account
options := &orm.CreateTableOptions{
Temp: false,
IfNotExists: true,
}
var err error
if err = context.CreateTable(&MilitaryForeign{}, options); err != nil {
return entity.ID, err
}
if entity... | [
0.010831791907548904,
0.2186342179775238,
0.7756530046463013,
0.05242503061890602,
0.5724137425422668,
-0.13464170694351196,
0.324169397354126,
0.08492931723594666,
0.3115522265434265,
-0.10735730081796646,
0.7607389092445374,
0.8049269914627075,
-0.6879502534866333,
1.163187026977539,
0... |
func (p IbcDataInfoPacketData) ValidateBasic() error {
// TODO: Validate the packet data
return nil
} | [
0.15903587639331818,
0.05972976237535477,
0.27808481454849243,
-0.6008579730987549,
0.4004797041416168,
1.2735052108764648,
-1.1823525428771973,
-0.7672765851020813,
-1.1382299661636353,
-0.7621992230415344,
0.165207177400589,
0.5656405687332153,
-0.15271541476249695,
-0.0550137460231781,
... |
func (p IbcDataInfoPacketData) GetBytes() ([]byte, error) {
var modulePacket Testsuit1PacketData
modulePacket.Packet = &Testsuit1PacketData_IbcDataInfoPacket{&p}
return modulePacket.Marshal()
} | [
0.22814296185970306,
1.4351553916931152,
0.4278150498867035,
-1.3146463632583618,
1.1778305768966675,
0.1881674975156784,
-0.7796543836593628,
-0.4674813151359558,
0.22591643035411835,
-0.7530299425125122,
-0.053382571786642075,
0.8842290639877319,
-1.2418818473815918,
0.13041344285011292,... |
func EmptyUserHandler() UserHandler {
return UserHandler(func(w http.ResponseWriter, r *http.Request, account *stormpath.Account) bool { return true })
} | [
-0.45884862542152405,
-0.22589117288589478,
0.2826201617717743,
0.21134087443351746,
-0.6723397970199585,
1.0565787553787231,
0.6778565645217896,
0.21211031079292297,
0.003429807024076581,
-0.1732824295759201,
-0.6204198002815247,
-0.8141773343086243,
-0.8065091371536255,
-1.06848418712615... |
func NewStormpathMiddleware(next http.Handler, cache stormpath.Cache) *StormpathMiddleware {
loadConfig()
clientConfig, err := stormpath.LoadConfiguration()
if err != nil {
stormpath.Logger.Panicf("[ERROR] Couldn't load Stormpath client configuration: %s", err)
}
stormpath.Init(clientConfig, cache)
applicati... | [
-0.05337763577699661,
-0.428692102432251,
0.38547179102897644,
0.7808086276054382,
-0.4036264717578888,
-0.013565601781010628,
0.43899816274642944,
-0.5733219981193542,
0.4315405488014221,
0.02820012904703617,
-0.08679794520139694,
-0.490861177444458,
-0.9815354347229004,
0.428534090518951... |
func NewCurrentCommand(activityRepo core.ActivityRepository) *cobra.Command {
currentCmd := &cobra.Command{
Use: "current",
Short: "Displays the current running activity, if any",
Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
ExitIfAppNotConfigured()
activity, err := activityRepo.... | [
-0.2659226059913635,
-1.4713478088378906,
0.317539781332016,
0.16128967702388763,
0.047026511281728745,
0.33506545424461365,
1.086219310760498,
0.4350147247314453,
-0.34158438444137573,
-0.01020539179444313,
0.7352966070175171,
0.7352724075317383,
0.006447263993322849,
0.8350628614425659,
... |
func (s *Service) ForkSchedule(ctx context.Context) ([]*spec.Fork, error) {
if s.forkSchedule != nil {
return s.forkSchedule, nil
}
s.forkScheduleMutex.Lock()
defer s.forkScheduleMutex.Unlock()
if s.forkSchedule != nil {
// Someone else fetched this whilst we were waiting for the lock.
return s.forkSchedule... | [
-0.6597021818161011,
0.3448677361011505,
0.3500879108905792,
0.35238057374954224,
-0.15303096175193787,
-1.3315904140472412,
-0.6286045908927917,
-0.6508100032806396,
0.3178101181983948,
0.1777549535036087,
-0.21514928340911865,
0.9065896272659302,
-0.6188598275184631,
0.31478366255760193,... |
func init() {
imports.Packages["gioui.org/app"] = imports.Package{
Name: "app",
Binds: map[string]r.Value{
"DataDir": r.ValueOf(app.DataDir),
"Main": r.ValueOf(app.Main),
"MaxSize": r.ValueOf(app.MaxSize),
"MinSize": r.ValueOf(app.MinSize),
"NewWindow": r.ValueOf(app.NewWindow),
"Size": r.ValueOf(app.Siz... | [
0.27169641852378845,
-0.299491286277771,
0.5479999780654907,
-0.45684561133384705,
-0.11713481694459915,
0.9181278944015503,
-0.04844066873192787,
-0.08386077731847763,
0.08400093019008636,
0.37171828746795654,
-0.5500961542129517,
0.6952689290046692,
-0.023700332269072533,
0.4602031111717... |
func Time() time.Time {
now := time.Now().UTC()
dif := time.Duration(rand.Int())
start := now.Add(dif * -1)
end := now.Add(dif)
return TimeSpan(start, end)
} | [
-0.6835906505584717,
0.28293365240097046,
0.5264214873313904,
-0.08986465632915497,
-0.4274754822254181,
1.292003870010376,
0.16821099817752838,
-0.2784552574157715,
0.37977176904678345,
0.10407857596874237,
-0.30142444372177124,
-0.3006175458431244,
-0.1852097064256668,
0.751166582107544,... |
func TimeSpan(start, end time.Time) time.Time {
if start.Equal(end) {
return start
}
sy, sm, sd := start.Date()
sh := start.Hour()
ss := start.Second()
sn := start.Nanosecond()
ey, em, ed := end.Date()
eh := end.Hour()
es := end.Second()
en := end.Nanosecond()
year := Between(sy, ey)
month := Between(in... | [
0.09456028044223785,
0.71173495054245,
0.7874129414558411,
-0.34388917684555054,
-0.6236135363578796,
0.27092039585113525,
0.07451501488685608,
-0.7528917193412781,
-0.7519627809524536,
0.7844861149787903,
-0.10891902446746826,
0.4077649712562561,
0.06482896953821182,
-0.015625156462192535... |
func (*Builds) RegisterBuildTask(ctx context.Context, req *pb.RegisterBuildTaskRequest) (*pb.RegisterBuildTaskResponse, error) {
if err := validateRegisterBuildTaskRequest(ctx, req); err != nil {
return nil, appstatus.BadRequest(err)
}
_, _, err := validateToken(ctx, req.BuildId, pb.TokenBody_REGISTER_TASK)
if e... | [
-0.8519943356513977,
0.23012295365333557,
0.625032901763916,
0.5335458517074585,
1.0183160305023193,
-0.09921127557754517,
0.3630784749984741,
-0.7264820337295532,
-0.2676599323749542,
-0.4218985140323639,
-1.0521222352981567,
0.7089545726776123,
0.2285679280757904,
0.6354602575302124,
0... |
func (*Impact) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*Impact_CostProjection)(nil),
}
} | [
-0.7036123871803284,
0.1929328292608261,
0.5365803241729736,
0.40004685521125793,
0.46995317935943604,
-0.04240027070045471,
0.14013490080833435,
-0.07396295666694641,
0.7774246335029602,
1.009439468383789,
-0.11403529345989227,
-0.30690261721611023,
-0.6564123630523682,
0.3954962790012359... |
func (*CreatePodPlanningsRequest) Descriptor() ([]byte, []int) {
return file_alameda_api_v1alpha1_datahub_plannings_services_proto_rawDescGZIP(), []int{0}
} | [
-1.4742306470870972,
0.9338897466659546,
0.3668099641799927,
-0.023893289268016815,
0.0014314440777525306,
0.6259775757789612,
0.28938019275665283,
-1.3057374954223633,
-0.5289839506149292,
-0.09486297518014908,
0.08985923230648041,
-0.21703916788101196,
-0.4988901913166046,
0.599607467651... |
func (*CreateControllerPlanningsRequest) Descriptor() ([]byte, []int) {
return file_alameda_api_v1alpha1_datahub_plannings_services_proto_rawDescGZIP(), []int{1}
} | [
-0.481408029794693,
0.9479134678840637,
0.3040865659713745,
0.29471495747566223,
0.17488442361354828,
0.9317055940628052,
0.8550665974617004,
-0.5934813618659973,
-0.1583937108516693,
-0.2074107676744461,
0.22591544687747955,
-0.20687760412693024,
-0.5003671646118164,
1.360042929649353,
... |
func (*CreateApplicationPlanningsRequest) Descriptor() ([]byte, []int) {
return file_alameda_api_v1alpha1_datahub_plannings_services_proto_rawDescGZIP(), []int{2}
} | [
-0.536365270614624,
0.8479620814323425,
0.2547668218612671,
0.5556182861328125,
-0.2835470736026764,
1.0226820707321167,
0.3654535114765167,
-0.5813764333724976,
-0.4578934907913208,
0.4221963882446289,
0.4804356098175049,
-0.2627279460430145,
-0.16594380140304565,
0.878892183303833,
0.2... |
func (*CreateNamespacePlanningsRequest) Descriptor() ([]byte, []int) {
return file_alameda_api_v1alpha1_datahub_plannings_services_proto_rawDescGZIP(), []int{3}
} | [
-1.0139180421829224,
1.0559712648391724,
0.19786949455738068,
0.3797563314437866,
-0.27929556369781494,
0.7040225267410278,
0.12060581892728806,
-1.5321285724639893,
0.12385183572769165,
0.010159107856452465,
0.09980710595846176,
-0.39615681767463684,
-0.5408132672309875,
1.369881868362426... |
func (*CreateNodePlanningsRequest) Descriptor() ([]byte, []int) {
return file_alameda_api_v1alpha1_datahub_plannings_services_proto_rawDescGZIP(), []int{4}
} | [
-1.341886281967163,
1.2076754570007324,
0.06721235811710358,
0.325355589389801,
-0.07020876556634903,
0.41862234473228455,
0.4304347336292267,
-1.1830719709396362,
-0.45347440242767334,
-0.16573642194271088,
0.16113989055156708,
-0.5012946724891663,
-0.0371742881834507,
1.011104702949524,
... |
func (*CreateClusterPlanningsRequest) Descriptor() ([]byte, []int) {
return file_alameda_api_v1alpha1_datahub_plannings_services_proto_rawDescGZIP(), []int{5}
} | [
-0.8088230490684509,
1.0620126724243164,
0.22054557502269745,
0.44740694761276245,
-0.10272718966007233,
0.790510892868042,
0.7408646941184998,
-0.8067224025726318,
-0.14142410457134247,
0.39893433451652527,
-0.03955091908574104,
-0.2082267850637436,
-0.4385221600532532,
0.543771505355835,... |
func (*ListPodPlanningsRequest) Descriptor() ([]byte, []int) {
return file_alameda_api_v1alpha1_datahub_plannings_services_proto_rawDescGZIP(), []int{6}
} | [
-1.771831750869751,
0.6660100221633911,
0.4960157871246338,
-0.09104396402835846,
-0.08616606146097183,
-0.02346423827111721,
-0.16277927160263062,
-0.8671001195907593,
-0.07030549645423889,
-0.6815893650054932,
-0.0636984333395958,
-0.04357733577489853,
0.42255809903144836,
-0.00431639654... |
func (*ListPodPlanningsResponse) Descriptor() ([]byte, []int) {
return file_alameda_api_v1alpha1_datahub_plannings_services_proto_rawDescGZIP(), []int{7}
} | [
-0.5095244646072388,
0.21146489679813385,
0.04038730636239052,
-0.11951076239347458,
-0.29182422161102295,
-0.4779004156589508,
0.5173668265342712,
-1.1372413635253906,
0.16236372292041779,
-0.21401898562908173,
-0.7457665801048279,
-0.7724132537841797,
-0.15837061405181885,
-1.04183411598... |
func (*ListControllerPlanningsRequest) Descriptor() ([]byte, []int) {
return file_alameda_api_v1alpha1_datahub_plannings_services_proto_rawDescGZIP(), []int{8}
} | [
-0.7640277743339539,
0.7145346403121948,
0.518410861492157,
-0.11040213704109192,
0.04636509716510773,
0.07370046526193619,
0.1354847550392151,
-0.14200036227703094,
0.3806770145893097,
-0.5971587896347046,
-0.07704154402017593,
-0.09327983111143112,
0.4647361636161804,
0.6476731300354004,... |
func (*ListControllerPlanningsResponse) Descriptor() ([]byte, []int) {
return file_alameda_api_v1alpha1_datahub_plannings_services_proto_rawDescGZIP(), []int{9}
} | [
0.646495521068573,
0.31331494450569153,
0.06888658553361893,
-0.07294051349163055,
-0.13749727606773376,
-0.23026253283023834,
0.7830785512924194,
-0.4423917531967163,
0.48440852761268616,
-0.02429734170436859,
-0.7249775528907776,
-0.9326500296592712,
-0.026148095726966858,
0.033726453781... |
func (*ListApplicationPlanningsRequest) Descriptor() ([]byte, []int) {
return file_alameda_api_v1alpha1_datahub_plannings_services_proto_rawDescGZIP(), []int{10}
} | [
-0.9851002097129822,
0.7419834733009338,
0.5046702027320862,
0.2741612195968628,
-0.3848716616630554,
0.1298873871564865,
-0.0463077686727047,
-0.5610907673835754,
0.249965101480484,
0.043255582451820374,
0.27758273482322693,
-0.04754861444234848,
0.6677067279815674,
0.38597220182418823,
... |
func (*ListApplicationPlanningsResponse) Descriptor() ([]byte, []int) {
return file_alameda_api_v1alpha1_datahub_plannings_services_proto_rawDescGZIP(), []int{11}
} | [
0.43850740790367126,
0.04416091740131378,
0.07254357635974884,
0.22881531715393066,
-0.555443525314331,
-0.3946174085140228,
0.560662567615509,
-0.7238179445266724,
0.5655168890953064,
0.4796420931816101,
-0.3946017622947693,
-0.7535567283630371,
0.22884339094161987,
-0.4521733522415161,
... |
func (*ListNamespacePlanningsRequest) Descriptor() ([]byte, []int) {
return file_alameda_api_v1alpha1_datahub_plannings_services_proto_rawDescGZIP(), []int{12}
} | [
-1.41843581199646,
0.9911100268363953,
0.5109036564826965,
0.050078097730875015,
-0.5875054001808167,
-0.1607932299375534,
-0.6067741513252258,
-1.1783578395843506,
0.8651378750801086,
-0.45737695693969727,
-0.13028058409690857,
-0.4215620458126068,
0.2545291483402252,
0.7876935005187988,
... |
func (*ListNamespacePlanningsResponse) Descriptor() ([]byte, []int) {
return file_alameda_api_v1alpha1_datahub_plannings_services_proto_rawDescGZIP(), []int{13}
} | [
-0.1449350118637085,
0.42942383885383606,
-0.07588126510381699,
-0.06499027460813522,
-0.8643986582756042,
-0.6844078302383423,
0.09413914382457733,
-1.5243600606918335,
1.1392219066619873,
0.08280334621667862,
-0.8681488037109375,
-1.1782490015029907,
-0.364309161901474,
-0.26628684997558... |
func (*ListNodePlanningsRequest) Descriptor() ([]byte, []int) {
return file_alameda_api_v1alpha1_datahub_plannings_services_proto_rawDescGZIP(), []int{14}
} | [
-1.5762375593185425,
1.1027939319610596,
0.342019647359848,
0.31133341789245605,
-0.07653879374265671,
-0.37596845626831055,
-0.2198018580675125,
-0.8895208835601807,
-0.008229793049395084,
-0.5984967350959778,
0.03965471684932709,
-0.030876630917191505,
0.5140827894210815,
0.3068302571773... |
func (*ListNodePlanningsResponse) Descriptor() ([]byte, []int) {
return file_alameda_api_v1alpha1_datahub_plannings_services_proto_rawDescGZIP(), []int{15}
} | [
-0.3922528326511383,
0.583781898021698,
-0.059914376586675644,
0.1761067807674408,
-0.17893922328948975,
-0.8173680305480957,
0.46582815051078796,
-1.3586580753326416,
0.2989549934864044,
-0.21011263132095337,
-0.6145325899124146,
-0.6744537353515625,
0.037227146327495575,
-0.4664595425128... |
func (*ListClusterPlanningsRequest) Descriptor() ([]byte, []int) {
return file_alameda_api_v1alpha1_datahub_plannings_services_proto_rawDescGZIP(), []int{16}
} | [
-1.1514288187026978,
0.8577395677566528,
0.4952891170978546,
0.2003815770149231,
-0.1858905553817749,
-0.01311744935810566,
0.09562576562166214,
-0.475067675113678,
0.35943958163261414,
0.08101238310337067,
-0.2710948884487152,
-0.025149833410978317,
0.4509955942630768,
-0.0081585403531789... |
func (*ListClusterPlanningsResponse) Descriptor() ([]byte, []int) {
return file_alameda_api_v1alpha1_datahub_plannings_services_proto_rawDescGZIP(), []int{17}
} | [
0.1985476016998291,
0.2719746530056,
0.07241252809762955,
0.15752387046813965,
-0.4303758144378662,
-0.5238144993782043,
0.756530225276947,
-0.5093041062355042,
0.6611253023147583,
0.45486921072006226,
-1.1314164400100708,
-0.8136851191520691,
-0.13474147021770477,
-0.833695650100708,
0.... |
func (*CreatePlanningsRequest) Descriptor() ([]byte, []int) {
return file_alameda_api_v1alpha1_datahub_plannings_services_proto_rawDescGZIP(), []int{18}
} | [
-1.0796258449554443,
1.0489718914031982,
0.19873400032520294,
0.3704741597175598,
-0.11197282373905182,
0.6651911735534668,
0.5230117440223694,
-0.8164875507354736,
-0.7394582033157349,
-0.33275076746940613,
0.18757744133472443,
-0.12231773883104324,
-0.057879429310560226,
1.17803776264190... |
func (*ListPlanningsRequest) Descriptor() ([]byte, []int) {
return file_alameda_api_v1alpha1_datahub_plannings_services_proto_rawDescGZIP(), []int{19}
} | [
-1.290257453918457,
0.8233257532119751,
0.4906269311904907,
0.009147116914391518,
-0.4222085773944855,
-0.24837766587734222,
0.04106922075152397,
-0.312805712223053,
0.29112595319747925,
-0.30696719884872437,
-0.31612420082092285,
-0.17256291210651398,
0.6944159865379333,
0.595670104026794... |
func (*ListPlanningsResponse) Descriptor() ([]byte, []int) {
return file_alameda_api_v1alpha1_datahub_plannings_services_proto_rawDescGZIP(), []int{20}
} | [
-0.17215296626091003,
0.5227161049842834,
0.11488089710474014,
-0.12517322599887848,
-0.6378692388534546,
-0.6841188073158264,
0.6048101186752319,
-0.5917081236839294,
0.7536744475364685,
0.11577647179365158,
-1.1061815023422241,
-1.075595498085022,
0.162183478474617,
-0.34034353494644165,... |
func Start(connString string) (err error) {
Conn, err = gorm.Open(postgres.Open(connString), &gorm.Config{
Logger: logger.Default.LogMode(logger.Silent),
NowFunc: func() time.Time { return time.Now().UTC() },
})
if err != nil {
return fmt.Errorf("failed to start to database: %w", err)
}
return nil
} | [
-0.04154259338974953,
-0.1817808449268341,
0.5288429260253906,
0.11413507908582687,
0.10497596859931946,
0.3677157759666443,
-0.33364996314048767,
0.9251195788383484,
-1.736608862876892,
0.82035231590271,
-0.5264924168586731,
0.8420459628105164,
-0.4563867747783661,
-0.2465038001537323,
... |
func NotFound(err error) bool {
return errors.Is(err, gorm.ErrRecordNotFound)
} | [
-0.03482937067747116,
-0.1192721575498581,
0.14106161892414093,
0.21972714364528656,
-0.13464170694351196,
0.7363656163215637,
-0.04855881258845329,
0.46851012110710144,
0.6868855357170105,
0.14144103229045868,
0.04260250926017761,
-0.026109471917152405,
-0.678753674030304,
0.8180113434791... |
func New() *OpenSSL {
return &OpenSSL{
openSSLSaltHeader: "Salted__", // OpenSSL salt is always this string + 8 bytes of actual salt
}
} | [
0.40260612964630127,
-1.2879130840301514,
0.3833004832267761,
-0.9356301426887512,
-1.8216487169265747,
-0.2259652316570282,
-1.0598127841949463,
-0.8372396230697632,
0.2718537747859955,
-0.4061613380908966,
-0.33399295806884766,
-0.1243819072842598,
0.49742764234542847,
-0.357228845357894... |
func (o *OpenSSL) DecryptString(passphrase, encryptedBase64String string) ([]byte, error) {
data, err := base64.StdEncoding.DecodeString(encryptedBase64String)
if err != nil {
return nil, err
}
if len(data) < aes.BlockSize {
return nil, fmt.Errorf("Data is too short")
}
saltHeader := data[:aes.BlockSize]
if ... | [
-0.26240748167037964,
0.04087568819522858,
0.5704419612884521,
-0.34057796001434326,
-0.17907191812992096,
-0.35928642749786377,
-0.44401341676712036,
-0.1456996649503708,
0.2494557648897171,
0.9413124322891235,
0.5662428140640259,
-0.07796965539455414,
-0.40159764885902405,
-0.53114694356... |
func (o *OpenSSL) EncryptString(passphrase, plaintextString string) ([]byte, error) {
salt := make([]byte, 8) // Generate an 8 byte salt
_, err := io.ReadFull(rand.Reader, salt)
if err != nil {
return nil, err
}
return o.EncryptStringWithSalt(passphrase, salt, plaintextString)
} | [
-0.688620924949646,
0.4795644283294678,
0.5913284420967102,
-0.6886774301528931,
0.15071985125541687,
0.5727742910385132,
-0.39973342418670654,
-0.25741708278656006,
0.5366678237915039,
0.8963260650634766,
0.26702746748924255,
0.037560246884822845,
-0.6253555417060852,
-0.719752311706543,
... |
func (o *OpenSSL) EncryptStringWithSalt(passphrase string, salt []byte, plaintextString string) ([]byte, error) {
if len(salt) != 8 {
return nil, ErrInvalidSalt
}
data := make([]byte, len(plaintextString)+aes.BlockSize)
copy(data[0:], o.openSSLSaltHeader)
copy(data[8:], salt)
copy(data[aes.BlockSize:], plainte... | [
0.11307749897241592,
-0.6549295783042908,
0.42704933881759644,
-0.8250800371170044,
-0.27643758058547974,
0.3633151650428772,
-1.050698161125183,
-0.5268454551696777,
0.7512484192848206,
1.058900237083435,
0.3937499225139618,
0.12267520278692245,
-0.07415565103292465,
-0.2609928548336029,
... |
func (o *OpenSSL) extractOpenSSLCreds(password, salt []byte) (openSSLCreds, error) {
m := make([]byte, 48)
prev := []byte{}
for i := 0; i < 3; i++ {
prev = o.hash(prev, password, salt)
copy(m[i*16:], prev)
}
return openSSLCreds{key: m[:32], iv: m[32:]}, nil
} | [
-0.07101041823625565,
-0.35574978590011597,
0.5930969715118408,
-0.32483118772506714,
-0.8205419778823853,
-0.04204597696661949,
-0.9411299824714661,
-0.08848971873521805,
0.30461132526397705,
0.7119702696800232,
-0.6399224996566772,
0.05700860917568207,
-0.8723482489585876,
-0.18781226873... |
func (o *OpenSSL) pkcs7Unpad(data []byte, blocklen int) ([]byte, error) {
if blocklen <= 0 {
return nil, fmt.Errorf("invalid blocklen %d", blocklen)
}
if len(data)%blocklen != 0 || len(data) == 0 {
return nil, fmt.Errorf("invalid data len %d", len(data))
}
padlen := int(data[len(data)-1])
if padlen > blocklen... | [
-0.05798397585749626,
0.24914930760860443,
1.1104310750961304,
-0.596347987651825,
-1.0782171487808228,
0.4048905074596405,
-0.6844403743743896,
-0.19649459421634674,
0.2493528574705124,
0.5434783697128296,
0.25478219985961914,
-0.03935353830456734,
-0.8362324237823486,
-0.0602885857224464... |
func TimeParse(datetime string) (timestamp time.Time, err error) {
datetime = strings.Replace(datetime, "am", "AM", -1)
datetime = strings.Replace(datetime, "pm", "PM", -1)
timeFormats := []string{
time.ANSIC,
time.UnixDate,
time.RubyDate,
time.RFC822,
time.RFC822Z,
time.RFC850,
time.RFC1123,
time.RF... | [
0.2629552185535431,
-0.2176121324300766,
0.9250631332397461,
-0.076411172747612,
-0.8835015296936035,
-0.4887249171733856,
-0.21977455914020538,
-0.5057408213615417,
0.10103195160627365,
1.0433831214904785,
-1.2965242862701416,
-0.6074849963188171,
-0.21105100214481354,
0.7370595335960388,... |
func NewTimer(name string, redis *RedisInstance, interval, checkBackupInterval time.Duration) (*Timer, error) {
timer := &Timer{
name: name,
redis: redis,
interval: interval,
checkBackupInterval: checkBackupInterval,
shutdown: make(chan struct{}),
}
// Pr... | [
-0.2592467665672302,
0.031068645417690277,
0.7475161552429199,
-0.4150737226009369,
-0.43976107239723206,
-0.3510366976261139,
-0.7895031571388245,
-0.07763637602329254,
0.33106571435928345,
0.3519805669784546,
-0.06076005473732948,
-0.2874104678630829,
-0.37371715903282166,
0.742684960365... |
func encodeScore(timestamp int64, tries uint16) float64 {
return float64(((timestamp & 0xffffffff) << 16) | int64(tries&0xffff))
} | [
0.24985486268997192,
0.6480658650398254,
0.4819563031196594,
0.08138316124677658,
0.49953290820121765,
-0.328547865152359,
-1.220702886581421,
-1.3321912288665771,
0.8029646873474121,
0.8489111661911011,
0.17964324355125427,
0.24092142283916473,
-0.6044062972068787,
-0.17274872958660126,
... |
func decodeScore(score float64) (int64, uint16) {
val := int64(score)
timestamp := (val >> 16) & 0xffffffff
tries := uint16(val & 0xffff)
return timestamp, tries
} | [
-0.37237128615379333,
0.6096746325492859,
0.5409035682678223,
0.008933833800256252,
0.4742062985897064,
-1.3115437030792236,
-0.7371999621391296,
-0.3982345163822174,
0.8950443863868713,
0.2474501132965088,
-0.8825788497924805,
-0.2965593934059143,
-0.24202196300029755,
-0.0892993360757827... |
func (t *Timer) tick() {
tick := time.NewTicker(t.interval)
checkBackupTicker := time.NewTicker(t.checkBackupInterval)
for {
select {
case now := <-tick.C:
currentSecond := now.Unix()
t.pump(currentSecond)
case now := <-checkBackupTicker.C:
t.pumpBackup(now.Unix())
case <-t.shutdown:
return
}
... | [
-0.39267003536224365,
0.6078441143035889,
0.5582208037376404,
0.6271274089813232,
0.6275522708892822,
0.08686629682779312,
0.3750497102737427,
-0.9446007013320923,
-0.6882112622261047,
0.7763989567756653,
0.14698860049247742,
-0.36385318636894226,
0.14897647500038147,
-0.08690574765205383,... |
func ListenToRunsQueue(callback func(amqp.Delivery)) {
for run := range runsDelivery {
go callback(run)
}
} | [
-0.4837861657142639,
-0.6539443135261536,
0.3548087775707245,
-1.0950367450714111,
0.4236389100551605,
-0.37085315585136414,
-0.5334155559539795,
0.47086432576179504,
0.20070584118366241,
0.20609186589717865,
0.17828212678432465,
0.29703041911125183,
0.6611578464508057,
1.4502019882202148,... |
func InitMessageQueue() {
// Make Connection
var err error
conn, err = amqp.Dial(configuration.GetInstance().GetString("rabbit-mq.url"))
if err != nil {
logrus.WithError(err).Fatal("can't connect to message queue")
}
// Make Channel
channel, err = conn.Channel()
if err != nil {
logrus.WithError(err).Fatal(... | [
-0.2521308362483978,
-1.1075191497802734,
0.9650139212608337,
-0.3031180500984192,
0.870880663394928,
0.0020069722086191177,
-0.28348278999328613,
0.12228299677371979,
-1.0695018768310547,
0.761223316192627,
-0.07366465032100677,
1.2049752473831177,
-0.2823053300380707,
1.4396872520446777,... |
func Close() {
conn.Close()
} | [
0.6863229274749756,
-0.24117659032344818,
0.20417678356170654,
0.533863365650177,
-0.07424180954694748,
0.5990984439849854,
-0.6903313398361206,
0.5342448353767395,
-1.3360443115234375,
-1.0124763250350952,
0.5502194166183472,
0.30914682149887085,
-0.7183765769004822,
0.4964693784713745,
... |
func main() {
client, err := database.NewClient("")
if err != nil {
log.Fatal("problem connecting to the database")
}
pathHandlers := handlers.NewHandler(client)
r := mux.NewRouter()
// Routes consist of a path and a handler function.
r.HandleFunc("/", pathHandlers.HelloWorld)
r.HandleFunc("/health", pathHand... | [
0.6494297385215759,
0.1519315093755722,
1.0136324167251587,
0.35204997658729553,
0.9146289825439453,
0.5313249230384827,
0.44653934240341187,
0.4587191939353943,
-1.1101113557815552,
-0.36324042081832886,
0.44570887088775635,
0.4379050135612488,
0.43296873569488525,
-0.30044567584991455,
... |
func (e *Endpoint) GetName() string {
return e.Name
} | [
-0.5109498500823975,
-0.29697665572166443,
0.4615211486816406,
0.5422603487968445,
0.27142927050590515,
0.08933678269386292,
-0.2657734751701355,
0.3306221663951874,
-0.17527687549591064,
1.340798258781433,
-0.026931216940283775,
0.04525025933980942,
-0.2482643574476242,
0.0477507375180721... |
func (e *Endpoint) GetOperations() []models.EndpointOperation {
return e.Operations
} | [
-0.7514945864677429,
0.925096869468689,
0.5922995209693909,
0.9933088421821594,
1.3542343378067017,
-0.04799386486411095,
0.03469330817461014,
-0.2780146300792694,
0.5823733806610107,
0.23455548286437988,
-0.1898178905248642,
-1.4786550998687744,
-0.643685519695282,
-0.40411582589149475,
... |
func SaveComic(comic Comic) (*mongo.UpdateResult, error) {
return Collections.Comics.UpdateOne(
context.Background(),
bson.D{
{"crawled_from", comic.CrawledFrom},
{"recognized_id", comic.RecognizedID},
},
bson.D{
{
"$set",
bson.D{
{"title", comic.Title},
{"crawled_from", comic.Crawle... | [
-0.49176347255706787,
-0.39659640192985535,
0.637776792049408,
-0.22601093351840973,
0.3063414990901947,
0.14894723892211914,
0.011656682007014751,
-0.21727299690246582,
-0.3799736499786377,
0.004238067660480738,
-1.353379487991333,
-0.644467294216156,
-0.443818598985672,
0.466495513916015... |
func main() {
demo3()
} | [
0.44047999382019043,
0.5872157216072083,
0.08142461627721786,
2.224073648452759,
-0.28044024109840393,
0.9153178930282593,
1.1435222625732422,
0.3913319408893585,
0.5924782156944275,
-0.6265721917152405,
-0.474190890789032,
0.6082706451416016,
-0.007947217673063278,
-0.2884361743927002,
... |
func (s *Service) NotifyFromGCSStorage(sp *storageprovider.Service) {
var sub *pubsub.Subscription
sub, err := s.Client.CreateSubscription(s.Context, s.Config.Subscription, pubsub.SubscriptionConfig{
Topic: s.Client.Topic(s.Config.Topic),
AckDeadline: 20 * time.Second,
})
if err != nil {
logger.Warnf("e... | [
0.7551366090774536,
-0.12460015714168549,
0.6940390467643738,
0.6783695816993713,
0.17136512696743011,
-0.023314066231250763,
-0.5380644202232361,
-0.5324597954750061,
-0.2906051576137543,
0.4636956453323364,
-0.931276261806488,
0.18073034286499023,
0.15549080073833466,
0.6131294965744019,... |
func New(ctx context.Context, googleCloudConfig *googlecloud.Config, pubsubConfig *PubSub) *Service {
plan, err := json.Marshal(googleCloudConfig)
if err != nil {
logger.Warnf("error while read config file: %s", err)
}
client, err := pubsub.NewClient(ctx, googleCloudConfig.ProjectId, option.WithCredentialsJSON(p... | [
0.576005220413208,
-0.5920284390449524,
0.3081798851490021,
-0.3725913166999817,
-0.5301571488380432,
0.9672892689704895,
-0.6726094484329224,
-0.17026962339878082,
-1.099590539932251,
0.3385780453681946,
0.1133725568652153,
0.7741060256958008,
-0.32379329204559326,
0.2907679080963135,
0... |
func run(pass *analysis.Pass) (interface{}, error) {
// get results from required inspect analyzer
inspectResult := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)
// filter AST of package under analysis for CallExpr nodes
inspectResult.Preorder([]ast.Node{(*ast.CallExpr)(nil)}, func(n ast.Node) {
// chec... | [
-0.47499880194664,
0.3142912685871124,
0.7101611495018005,
-0.09374219179153442,
0.09050359576940536,
0.23186007142066956,
1.1861671209335327,
-0.4208000898361206,
-0.0215244572609663,
0.3318479061126709,
-0.41085758805274963,
0.11547267436981201,
-0.36133667826652527,
0.7495686411857605,
... |
func structCastWithMismatchingTargetLength(expr *ast.CallExpr, pass *analysis.Pass) bool {
// first, check if this node represents a direct cast using unsafe
src, dst, ok := detectUnsafeCast(expr)
if !ok {
return false
}
// it is a cast. Get the source and destination types
srcType := getObjectType(src, pass)
... | [
-0.8406242728233337,
0.06845207512378693,
0.6751617193222046,
0.21849961578845978,
-0.37714236974716187,
0.9650909304618835,
-0.06891423463821411,
-0.5596442222595215,
0.5919114947319031,
0.4735157787799835,
-0.19935688376426697,
0.43741339445114136,
0.0022532714065164328,
0.22488379478454... |
func detectUnsafeCast(expr ast.Expr) (ast.Expr, ast.Expr, bool) {
// find the potential cast expression: it might be a star expression (pointer), then take the inner node. Otherwise
// we have the cast node directly
var castExpr ast.Expr
starExpr, ok := expr.(*ast.StarExpr)
if ok {
castExpr = starExpr.X
} else ... | [
-1.0857335329055786,
-0.48399969935417175,
0.8006083965301514,
-0.04769054055213928,
-0.5814785957336426,
-0.3489273488521576,
-0.1699589043855667,
-0.14343324303627014,
0.6363576650619507,
1.0105533599853516,
-0.22123630344867706,
0.7614063620567322,
-0.29299047589302063,
0.79878437519073... |
func getObjectType(expr ast.Expr, pass *analysis.Pass) types.Type {
return pass.TypesInfo.Types[expr].Type.Underlying()
} | [
-0.09945422410964966,
-0.28610122203826904,
0.6217988729476929,
-0.04077136516571045,
0.594330906867981,
0.8424006700515747,
0.27023249864578247,
-0.22755615413188934,
-0.14295528829097748,
0.4825190305709839,
0.460421085357666,
0.39867332577705383,
0.04724716767668724,
-0.618488609790802,... |
func checkIncompatibleStructsCast(src types.Type, dst types.Type) bool {
// check if the source type is a struct
srcStruct, ok := src.(*types.Struct)
if !ok {
return false
}
// check if the destination type is a struct
dstStruct, ok := dst.(*types.Struct)
if !ok {
return false
}
srcPlatformDependentCount... | [
0.052624184638261795,
0.48794740438461304,
0.7588695287704468,
-0.31964823603630066,
-1.1484754085540771,
0.6717329025268555,
1.086350917816162,
-0.04175293445587158,
-0.5886680483818054,
0.18851973116397858,
-0.5600491762161255,
-0.15731099247932434,
-0.19919255375862122,
0.31469640135765... |
func isPlatformDependent(field *types.Var) bool {
// check whether it is a basic type
basicType, ok := field.Type().(*types.Basic)
if !ok {
return false
}
// check whether the basic type is int, uint, or uintptr
kind := basicType.Kind()
if kind == types.Int || kind == types.Uint || kind == types.Uintptr {
... | [
-0.6019347310066223,
0.004739466588944197,
0.6357131600379944,
0.0711970403790474,
-0.2763717770576477,
1.1395812034606934,
0.4946354925632477,
0.010023466311395168,
-0.8357917070388794,
-0.06316003948450089,
-0.9634568691253662,
-0.43864232301712036,
-1.342513084411621,
1.8016668558120728... |
func (b *UpdateEndpoint) processExpirationParam(instance *internal.Instance, details domain.UpdateDetails, ers internal.ERSContext, logger logrus.FieldLogger) (*internal.Instance, error) {
// if the instance was expired before (in the past), then no need to do any work
if instance.IsExpired() {
return instance, nil... | [
-0.7578481435775757,
-0.7076016068458557,
0.7626451849937439,
-0.3021495044231415,
0.17642292380332947,
0.41998201608657837,
-0.3244474530220032,
0.17616990208625793,
0.09688141942024231,
1.269215703010559,
0.41023972630500793,
0.08630668371915817,
-0.43612897396087646,
0.7125324606895447,... |
func (c *IDCard) GetOwner() string {
return c.owner
} | [
0.48794427514076233,
-0.14383374154567719,
0.3743566870689392,
0.9328464865684509,
0.18877457082271576,
0.33767038583755493,
0.03188418969511986,
-0.5049591064453125,
0.2228844165802002,
-0.6530472636222839,
-0.713474690914154,
-0.04020507261157036,
-0.3002956211566925,
-0.7436854243278503... |
func (c *IDCard) Use() {
fmt.Printf("%s 使用了一次 ID Card\n", c.owner)
time.Sleep(time.Second)
} | [
0.1168888732790947,
0.5386743545532227,
0.7853089570999146,
0.22533054649829865,
-0.09173835068941116,
-0.16046659648418427,
0.4618300199508667,
-0.547458827495575,
-0.12284966558218002,
-0.2886732816696167,
-0.4541695713996887,
1.2115871906280518,
-1.1173427104949951,
0.044665612280368805... |
func (client *NamespacesClient) GetList(limit, skip int) (*schema.Namespaces, error) {
if limit <= 0 {
limit = 10
}
if skip < 0 {
skip = 0
}
response, err := client.http.execute("GET", fmt.Sprintf("%s?limit=%d&skip=%d", endpointNamespaces, limit, skip), nil)
if err != nil {
return nil, err
}
namespaces ... | [
-0.5097810626029968,
0.9487758874893188,
0.6702685952186584,
-0.23093818128108978,
0.19250424206256866,
-0.06262114644050598,
-0.5166608691215515,
-0.3182525038719177,
1.0724611282348633,
0.4840896427631378,
-0.40525516867637634,
0.6336272358894348,
-0.2748745381832123,
-0.1052384674549102... |
func (client *NamespacesClient) GetSingle(id string) (*schema.Namespace, error) {
response, err := client.http.execute("GET", fmt.Sprintf("%s/%s", endpointNamespaces, id), nil)
if err != nil {
return nil, err
}
namespace := new(schema.Namespace)
if err := json.Unmarshal(response, namespace); err != nil {
retu... | [
-0.8525417447090149,
0.9302518963813782,
0.5666459798812866,
0.25977426767349243,
-0.21127647161483765,
-0.6519637703895569,
-0.3484950065612793,
-0.8334625959396362,
0.825162947177887,
-0.48801180720329285,
-0.21398845314979553,
1.0706371068954468,
-1.0560954809188843,
0.12017038464546204... |
func (client *NamespacesClient) Create(data *schema.CreateNamespaceData) (*schema.Namespace, error) {
response, err := client.http.execute("POST", endpointNamespaces, data)
if err != nil {
return nil, err
}
namespace := new(schema.Namespace)
if err := json.Unmarshal(response, namespace); err != nil {
return n... | [
-0.2730255424976349,
0.38189929723739624,
0.2158568948507309,
0.23168997466564178,
-0.21774885058403015,
0.30945679545402527,
-0.8691883683204651,
-0.9821538925170898,
0.44280457496643066,
0.0009424100280739367,
-0.0093299625441432,
0.06417140364646912,
-1.2834426164627075,
0.3441070914268... |
func (client *NamespacesClient) Patch(id string, data *schema.PatchNamespaceData) (*schema.Namespace, error) {
response, err := client.http.execute("PATCH", fmt.Sprintf("%s/%s", endpointNamespaces, id), data)
if err != nil {
return nil, err
}
namespace := new(schema.Namespace)
if err := json.Unmarshal(response,... | [
-0.7539945840835571,
-0.3073558509349823,
0.20372967422008514,
-0.5431072115898132,
-1.3166049718856812,
0.6458414793014526,
-0.8164571523666382,
-0.48075997829437256,
1.3989202976226807,
-0.3396928012371063,
-0.15173980593681335,
0.9989151358604431,
-0.8313403725624084,
0.0890741571784019... |
func (client *NamespacesClient) ResetToken(id string) (*schema.Namespace, error) {
response, err := client.http.execute("POST", fmt.Sprintf("%s/%s/%s", endpointNamespaces, id, endpointPartNamespacesResetToken), nil)
if err != nil {
return nil, err
}
namespace := new(schema.Namespace)
if err := json.Unmarshal(re... | [
-1.0192607641220093,
0.3424067795276642,
0.3775777518749237,
-0.3240044414997101,
-0.19375978410243988,
-0.42296209931373596,
-0.29382237792015076,
0.049720097333192825,
0.6999077796936035,
-0.3322094976902008,
-1.1244837045669556,
1.6244142055511475,
-0.8352715969085693,
-0.25866949558258... |
func (client *NamespacesClient) Delete(id string) error {
_, err := client.http.execute("DELETE", fmt.Sprintf("%s/%s", endpointNamespaces, id), nil)
return err
} | [
0.05475834012031555,
0.4643450677394867,
0.14798589050769806,
0.028324179351329803,
0.2785305976867676,
0.4090562164783478,
-0.4361307621002197,
-0.8551554679870605,
1.002105712890625,
0.6238007545471191,
-0.07674586027860641,
0.49944260716438293,
-1.5166596174240112,
0.17327100038528442,
... |
func handleConenction(conn rcon.RCONServerConn, log *zap.SugaredLogger, password string, stdin io.WriteCloser) {
defer func() {
if err := conn.Close(); err != nil {
log.Debug(err)
}
}()
if err := conn.AcceptLogin(password); err != nil {
log.Debug(err)
return
}
for {
cmd, err := conn.AcceptCmd()
if ... | [
0.17945709824562073,
-0.8529631495475769,
1.0932445526123047,
-0.002545562107115984,
0.07292846590280533,
-0.3141879141330719,
0.9783759117126465,
-0.03523644059896469,
-0.5170632004737854,
0.34650158882141113,
0.23189088702201843,
-0.9993509650230408,
-0.36222949624061584,
0.0993602722883... |
func serverExitHandler(cmd *exec.Cmd, log *zap.SugaredLogger) chan struct{} {
cmdStop := make(chan struct{}, 1)
go func() {
err := cmd.Wait()
if err != nil {
if exitErr, ok := err.(*exec.ExitError); ok {
exitCode := exitErr.ExitCode()
log.Errorw("bedrock server exited with error", "exitCode", exitCode... | [
-0.638482391834259,
-0.8531126976013184,
0.7427746653556824,
-0.4116332530975342,
-0.4337957799434662,
0.7565207481384277,
0.6635465025901794,
-0.24619190394878387,
-0.38062936067581177,
0.6548940539360046,
-0.027524113655090332,
0.24393583834171295,
-0.627770185470581,
0.7052602767944336,... |
func mainExitHandler(stop, cmdStop chan struct{}, stdin io.WriteCloser, log *zap.SugaredLogger, rcon *rcon.RCONListener, rconStop chan struct{}) {
for {
select {
case <-stop:
stopServer(stdin, log)
case <-cmdStop:
close(stop)
close(rconStop)
return
}
}
} | [
-0.5648748278617859,
-0.979529619216919,
0.4546867907047272,
-0.16751083731651306,
-0.45427417755126953,
0.4963240325450897,
-0.03271453455090523,
-0.47727280855178833,
-0.35728228092193604,
0.30199098587036133,
0.15503451228141785,
-0.6454504728317261,
-0.5658263564109802,
0.2733604013919... |
func stopServer(stdin io.WriteCloser, log *zap.SugaredLogger) {
log.Info("writing stop to bedrock server...")
if _, err := stdin.Write([]byte("stop\n")); err != nil {
log.Error("failed to write \"stop\" to server")
}
} | [
-1.8403364419937134,
-0.6548889875411987,
0.6089474558830261,
0.1775612086057663,
0.37863248586654663,
1.0704374313354492,
0.7208567261695862,
-0.07538768649101257,
-0.8375826478004456,
0.3501727879047394,
-0.7054826617240906,
0.40205082297325134,
-1.1775230169296265,
0.802752673625946,
... |
func (nsc *NilConsumerStatsCollector) AddConsumed(int) {} | [
1.1237112283706665,
-0.09451734274625778,
0.35024696588516235,
-0.04436104744672775,
0.5848562121391296,
0.2248692661523819,
0.7847843766212463,
-0.8083879947662354,
0.2149612009525299,
-0.3875775933265686,
-0.19949164986610413,
-0.15082010626792908,
-0.3539183735847473,
0.7002356648445129... |
func (nsc *NilConsumerStatsCollector) AddDelivered(int) {} | [
1.0963728427886963,
-0.16769513487815857,
0.42841941118240356,
-0.3357464671134949,
0.5721538662910461,
0.7525913119316101,
0.056029558181762695,
-0.2701908051967621,
0.7294872999191284,
-1.444990634918213,
-0.5982503294944763,
-0.6238806247711182,
0.25225740671157837,
0.9996163845062256,
... |
func (nsc *NilConsumerStatsCollector) AddProcessed(int) {} | [
0.6454051733016968,
-0.08301408588886261,
0.3674241304397583,
-0.5835691094398499,
0.8583766222000122,
0.17767047882080078,
0.37519577145576477,
-0.31930774450302124,
0.16714274883270264,
-0.8570239543914795,
0.02627716027200222,
-0.00007729291974101216,
-0.9474038481712341,
0.532381296157... |
func (nsc *NilConsumerStatsCollector) UpdateBatchSize(int) {} | [
0.3192320168018341,
-0.2978367805480957,
0.2990293800830841,
-0.04948367178440094,
-0.45680350065231323,
-0.12991371750831604,
0.21829751133918762,
-0.1198405995965004,
-0.542560875415802,
-0.4061313569545746,
-0.6658743619918823,
0.08947764337062836,
-0.2872515022754669,
0.602336823940277... |
func (nsc *NilConsumerStatsCollector) AddGetRecordsCalled(int) {} | [
0.7456196546554565,
0.3108992278575897,
0.5020071864128113,
-1.0108981132507324,
1.1634724140167236,
0.3717323839664459,
-0.14769235253334045,
-0.628814160823822,
0.5777815580368042,
-0.28344884514808655,
0.3267732262611389,
0.30674728751182556,
-0.6146622896194458,
0.37527474761009216,
... |
func (nsc *NilConsumerStatsCollector) AddReadProvisionedThroughputExceeded(int) {} | [
0.44537946581840515,
0.551219642162323,
0.11573424190282822,
-0.8554398417472839,
-0.6709192395210266,
1.2566133737564087,
0.9481616616249084,
-0.31660589575767517,
0.2951066493988037,
-0.46071434020996094,
1.1384943723678589,
-0.08045635372400284,
-0.5708257555961609,
0.28353825211524963,... |
func (nsc *NilConsumerStatsCollector) AddGetRecordsTimeout(int) {} | [
1.0982099771499634,
0.05640923231840134,
0.3229050040245056,
-0.728363573551178,
1.131331205368042,
-0.049864549189805984,
0.41908571124076843,
0.1542096585035324,
0.4007435441017151,
0.11784865707159042,
0.4603012800216675,
0.32957345247268677,
-0.6115560531616211,
0.2399856001138687,
0... |
func (nsc *NilConsumerStatsCollector) AddGetRecordsReadTimeout(int) {} | [
1.1611422300338745,
-0.18085195124149323,
0.3890267312526703,
-0.8934233784675598,
0.9365605115890503,
0.11289610713720322,
0.0908065214753151,
0.05323852598667145,
0.44536638259887695,
-0.04267711192369461,
0.7654308676719666,
0.24431148171424866,
-0.40374428033828735,
-0.0049374960362911... |
func (nsc *NilConsumerStatsCollector) UpdateProcessedDuration(time.Duration) {} | [
-0.2632439434528351,
-0.8103306889533997,
0.17084218561649323,
-0.12853644788265228,
-0.14547710120677948,
0.33202776312828064,
0.8662993311882019,
-0.2518518269062042,
-0.11049780994653702,
0.39894959330558777,
0.06410165131092072,
0.5304750800132751,
-0.353489488363266,
0.837944209575653... |
func (nsc *NilConsumerStatsCollector) UpdateGetRecordsDuration(time.Duration) {} | [
0.2420538365840912,
-0.5311762094497681,
0.09658806025981903,
-0.4063226878643036,
0.5398162007331848,
-0.1807129979133606,
0.332230806350708,
-0.16308462619781494,
0.21300436556339264,
0.950731635093689,
0.2672169506549835,
0.5741222500801086,
-0.6378461122512817,
0.2506260275840759,
0.... |
func (nsc *NilConsumerStatsCollector) UpdateGetRecordsReadResponseDuration(time.Duration) {} | [
0.5231302976608276,
-1.203270673751831,
0.22604498267173767,
-0.8404714465141296,
0.22554636001586914,
-0.16066874563694,
0.5482156872749329,
-0.31090670824050903,
0.6455547213554382,
0.6202461123466492,
0.6724238395690918,
-0.05720202252268791,
-0.20169949531555176,
-0.23816265165805817,
... |
func (nsc *NilConsumerStatsCollector) UpdateGetRecordsUnmarshalDuration(time.Duration) {} | [
0.6684824228286743,
-0.09891020506620407,
0.1199726089835167,
-1.365136981010437,
0.16758733987808228,
-0.17605060338974,
0.25809457898139954,
0.6028046011924744,
0.1154889240860939,
0.6451154947280884,
0.5003347992897034,
0.5066053867340088,
0.04425681009888649,
0.06707499176263809,
0.6... |
func (nsc *NilConsumerStatsCollector) AddCheckpointInsert(int) {} | [
0.66156005859375,
-0.2825131416320801,
0.3005225956439972,
0.08860243856906891,
0.6793590188026428,
0.3550834059715271,
0.3597126305103302,
0.021905528381466866,
0.07439292967319489,
0.6286726593971252,
-0.07758081704378128,
-1.2153204679489136,
-1.3065881729125977,
0.6020354628562927,
-... |
func (nsc *NilConsumerStatsCollector) AddCheckpointDone(int) {} | [
0.9751989841461182,
-0.41177818179130554,
0.3572792708873749,
0.7288036346435547,
1.1282477378845215,
0.9975036382675171,
0.4475772976875305,
-0.21103152632713318,
-0.0693856030702591,
0.48811402916908264,
-0.049686018377542496,
-1.0210951566696167,
-0.9011569619178772,
0.7538425922393799,... |
func (nsc *NilConsumerStatsCollector) UpdateCheckpointSize(int) {} | [
0.20801763236522675,
-0.5283189415931702,
0.20104505121707916,
0.4732099771499634,
-0.11516615748405457,
0.09943902492523193,
0.4168914556503296,
0.0056616622023284435,
0.19572103023529053,
1.1087645292282104,
0.027651337906718254,
-0.6257386207580566,
-0.7316992878913879,
0.42709189653396... |
func (nsc *NilConsumerStatsCollector) AddCheckpointSent(int) {} | [
0.8117190003395081,
-0.515353798866272,
0.1671566665172577,
-0.05497461184859276,
0.7410147786140442,
0.47512537240982056,
0.30569958686828613,
-0.2918408513069153,
0.13540729880332947,
0.6577931642532349,
0.09889282286167145,
-0.512803852558136,
-0.8930167555809021,
0.32398122549057007,
... |
func (nsc *NilConsumerStatsCollector) AddCheckpointSuccess(int) {} | [
0.6638607978820801,
0.10802741348743439,
0.2689400315284729,
0.37003621459007263,
0.5165945291519165,
0.6749008297920227,
0.21849676966667175,
-0.05158359184861183,
0.5100743174552917,
0.769737184047699,
-0.05407356470823288,
-1.24472975730896,
-0.3019252419471741,
0.3231663107872009,
0.... |
func NewDefaultConsumerStatsCollector(r metrics.Registry) *DefaultConsumerStatsCollector {
return &DefaultConsumerStatsCollector{
Consumed: metrics.GetOrRegisterCounter(MetricsConsumed, r),
Delivered: metrics.GetOrRegisterCounter(MetricsDelivered, r),
Processed: ... | [
0.4275767207145691,
0.17484767735004425,
0.6444346904754639,
-0.3235907554626465,
0.5050287246704102,
-0.24517209827899933,
0.3980339765548706,
-0.3191082775592804,
0.20910145342350006,
-0.2096254676580429,
0.2977151870727539,
0.2133851945400238,
0.41185450553894043,
0.8505121469497681,
... |
func (dsc *DefaultConsumerStatsCollector) AddConsumed(count int) {
dsc.Consumed.Inc(int64(count))
} | [
0.4562382400035858,
0.22081038355827332,
0.38537055253982544,
-0.17044107615947723,
0.4173038899898529,
0.5862629413604736,
0.44394227862358093,
-0.7949380874633789,
-0.35485580563545227,
-1.0131787061691284,
-0.28868234157562256,
-0.322878897190094,
0.18968842923641205,
0.7149586081504822... |
func (dsc *DefaultConsumerStatsCollector) AddDelivered(count int) {
dsc.Delivered.Inc(int64(count))
} | [
0.4430743157863617,
0.10332401841878891,
0.47259271144866943,
-0.46307820081710815,
0.5042921304702759,
0.9859774708747864,
0.0014934407081454992,
-0.16557100415229797,
0.07244323194026947,
-1.9256354570388794,
-0.7149196267127991,
-0.6713359355926514,
0.563243567943573,
0.9214406609535217... |
func (dsc *DefaultConsumerStatsCollector) AddProcessed(count int) {
dsc.Processed.Inc(int64(count))
} | [
-0.06790562719106674,
0.27179011702537537,
0.3501404821872711,
-0.5893348455429077,
0.7630455493927002,
0.2029988020658493,
0.26058754324913025,
-0.3881152868270874,
-0.488029420375824,
-1.4790065288543701,
-0.2920924127101898,
-0.023301320150494576,
-0.20372404158115387,
0.541624665260314... |
func (dsc *DefaultConsumerStatsCollector) UpdateBatchSize(count int) {
dsc.BatchSize.Update(int64(count))
} | [
-0.3963649570941925,
0.07458745688199997,
0.17464175820350647,
0.09002818167209625,
-0.3390449285507202,
0.15414951741695404,
0.03619159013032913,
0.05744645744562149,
-1.2340677976608276,
-0.5017791986465454,
-0.7717759609222412,
0.024726416915655136,
0.07719945162534714,
0.74528396129608... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.