text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (m *Manager) DownloadBackupWithLogPosition(storageService, fullBackupPath string, binlog string) (path string, err error) {
s, ok := m.storageServices[storageService]
if !ok {
return path, fmt.Errorf("unknown storage service")
}
return s.DownloadBackupWithLogPosition(fullBackupPath, binlog)
} | [
0.19329725205898285,
-0.7808083295822144,
0.7973443269729614,
0.47053655982017517,
-0.6790019273757935,
-0.31130334734916687,
-0.39457181096076965,
-1.0874667167663574,
-0.24478250741958618,
-0.25756123661994934,
-0.29478132724761963,
-0.6801562309265137,
-0.2600852847099304,
-0.6366437673... |
func NewIOClosers(closers []io.Closer) *IOClosers {
return &IOClosers{
closers: closers,
}
} | [
-1.5089048147201538,
-1.4100066423416138,
0.1735001504421234,
0.36130470037460327,
-1.2307103872299194,
-0.64183109998703,
-0.16309794783592224,
-1.2747639417648315,
0.17753584682941437,
0.29320448637008667,
-0.46000027656555176,
0.2782604396343231,
-1.0452430248260498,
-0.4910138845443725... |
func (m *IOClosers) Close() (err error) {
for _, c := range m.closers {
if err = c.Close(); err != nil {
logger.Errorf("Error closing write strream: %s", err.Error())
}
}
return
} | [
-0.9176038503646851,
-0.8604039549827576,
0.34449663758277893,
-0.0086336275562644,
0.34566232562065125,
0.2437073141336441,
0.704433798789978,
-1.0015077590942383,
-1.1679484844207764,
0.2540593445301056,
1.1410956382751465,
-0.03072071075439453,
-1.8741551637649536,
0.10030459612607956,
... |
func (g *Graph) AddNode(node *GraphNode) {
g.nodes = append(g.nodes, node)
} | [
-0.7549021244049072,
1.2177609205245972,
-0.02128395065665245,
-0.27700650691986084,
0.6292046308517456,
0.47284141182899475,
-0.693385124206543,
-0.119964599609375,
0.3177143335342407,
-0.6046650409698486,
-0.13502216339111328,
1.0214684009552002,
-0.39510148763656616,
0.14833348989486694... |
func (g *Graph) AddEdge(node1, node2 *GraphNode) {
node1.edges = append(node1.edges, node2)
} | [
-0.7805041074752808,
0.8059919476509094,
0.561554491519928,
0.18644288182258606,
0.38539421558380127,
0.7248992919921875,
-1.4326233863830566,
0.6176877617835999,
-1.0741561651229858,
-0.039436597377061844,
0.1751929670572281,
1.4707720279693604,
-0.5198901295661926,
0.07404758781194687,
... |
func (g *Graph) Print() {
for i := 0; i < len(g.nodes); i++ {
fmt.Println()
fmt.Printf("%v -> ", g.nodes[i].data)
edges := g.nodes[i].edges
for j := 0; j < len(edges); j++ {
fmt.Printf("%v ", edges[j].data)
}
}
} | [
0.004203001502901316,
0.36976560950279236,
0.36929985880851746,
-1.3518332242965698,
0.542784571647644,
0.7438644766807556,
-0.3020889163017273,
-0.21378052234649658,
-0.9033645391464233,
-0.5459737181663513,
0.2415630966424942,
1.3008168935775757,
-0.16574780642986298,
0.07690729945898056... |
func RegisterModule(module Module) error {
genericModuleId := module.GenericId()
specificModuleId := module.SpecificId()
_, ok := registeredModulesById[genericModuleId][specificModuleId]
if ok {
return fmt.Errorf("id colision detected : %q / %q", genericModuleId, specificModuleId)
}
err := module.Register()
i... | [
-1.472734808921814,
-0.11642380803823471,
0.5647519826889038,
-0.5381960272789001,
1.159569501876831,
0.6993101835250854,
0.10148505866527557,
-0.6386368274688721,
0.828863799571991,
0.21264544129371643,
-0.17164187133312225,
1.4417084455490112,
-0.23888294398784637,
0.7794831991195679,
... |
func UnregisterModule(module Module) error {
moduleType := module.Type()
genericModuleId := module.GenericId()
specificModuleId := module.SpecificId()
typeModuleMap := registeredModulesByType[moduleType][genericModuleId]
for id, m := range typeModuleMap {
if m == module {
// Remove module from modules by typ... | [
-1.1819425821304321,
-0.29707497358322144,
0.7181336283683777,
-0.49370378255844116,
1.0530431270599365,
0.48342394828796387,
0.522218644618988,
-0.021608153358101845,
0.15159720182418823,
0.8965835571289062,
0.04324019327759743,
1.2467135190963745,
-0.7241411209106445,
0.8293020129203796,... |
func GetModulesByType(moduleType string) FullModuleMap {
return registeredModulesByType[moduleType]
} | [
-0.7487100958824158,
-0.3237365782260895,
0.14301332831382751,
0.35314130783081055,
0.8501096963882446,
-0.084808349609375,
0.3109353482723236,
-1.1762748956680298,
1.0141091346740723,
0.6983000636100769,
-0.5512101650238037,
0.7281384468078613,
-0.6170980334281921,
0.8549178838729858,
1... |
func GetModuleCountByType(moduleType string) int {
return countFullModuleMap(GetModulesByType(moduleType))
} | [
-0.5107873678207397,
-0.3564891219139099,
0.49706730246543884,
0.03432374820113182,
0.4008810818195343,
0.013026595115661621,
0.6168549060821533,
-0.5615885853767395,
0.4953601360321045,
0.8937932252883911,
-0.42479756474494934,
0.700261652469635,
-0.5932469964027405,
0.9370824098587036,
... |
func GetModulesByGenericId(genericModuleId string) ModuleMap {
return registeredModulesById[genericModuleId]
} | [
-1.5839709043502808,
-0.705388605594635,
0.2588999271392822,
-0.21111923456192017,
1.184575080871582,
0.7167559862136841,
-0.5774990916252136,
-1.1584813594818115,
0.6368557810783386,
0.17962592840194702,
0.17279401421546936,
1.3831572532653809,
-0.21769946813583374,
0.6531100869178772,
... |
func GetModuleCountByGenericId(genericModuleId string) int {
return len(GetModulesByGenericId(genericModuleId))
} | [
-1.0828289985656738,
-0.5118427276611328,
0.5055769681930542,
-0.4353059232234955,
1.05402672290802,
0.5202978253364563,
-0.2586649954319,
-0.4883081018924713,
0.15399286150932312,
0.7561416625976562,
0.1674419343471527,
1.4811921119689941,
0.15894684195518494,
0.8198164105415344,
0.3985... |
func GetModuleById(genericModuleId, specificModuleId string) Module {
return registeredModulesById[genericModuleId][specificModuleId]
} | [
-0.3033819794654846,
-0.784067690372467,
0.10332509130239487,
-0.32539910078048706,
1.0047622919082642,
0.35461899638175964,
-0.8887651562690735,
-0.6080400943756104,
0.2724545896053314,
0.6666753888130188,
0.45711514353752136,
2.532139778137207,
-0.1462114304304123,
0.6322972774505615,
... |
func GetDefaultModuleByGenericId(genericModuleId string) Module {
// Default module jas the empty string as the specificModuleId.
return registeredModulesById[genericModuleId][""]
} | [
-0.962650716304779,
-0.5093836784362793,
0.04776454344391823,
-0.0074197156354784966,
1.981533408164978,
0.6277984380722046,
-0.5726010799407959,
-0.955333411693573,
0.3827556073665619,
0.4660969376564026,
0.4155593514442444,
1.23921799659729,
-0.3621658384799957,
0.9476098418235779,
-0.... |
func GetAllModules() FullModuleMap {
return registeredModulesById
} | [
-0.5349127650260925,
-0.15703600645065308,
0.32921484112739563,
0.9569907188415527,
0.5290709733963013,
0.4188803434371948,
-0.5236300826072693,
-0.402955025434494,
1.5855671167373657,
-0.4089483320713043,
-0.7195929884910583,
0.9515928626060486,
-0.15030276775360107,
0.4905599057674408,
... |
func GetAllModulesCount() int {
return countFullModuleMap(GetAllModules())
} | [
-0.017887752503156662,
-0.3105880320072174,
0.522929847240448,
0.5461461544036865,
0.10609050840139389,
0.28240519762039185,
-0.152130588889122,
0.3755016028881073,
0.8535301685333252,
-0.0680093988776207,
-0.5128999352455139,
0.360458642244339,
-0.13472490012645721,
0.5971201062202454,
... |
func countFullModuleMap(fullModuleMap FullModuleMap) int {
count := 0
for _, s := range fullModuleMap {
count = count + len(s)
}
return count
} | [
-0.37700992822647095,
-0.9730537533760071,
0.44833171367645264,
0.10381127893924713,
-0.060996465384960175,
0.874347448348999,
0.47673195600509644,
0.35736334323883057,
0.635051965713501,
0.4130650460720062,
-1.4223812818527222,
-0.1549251526594162,
-0.1931091845035553,
0.9117587208747864,... |
func NewVolumeSnapshotAttributesType() *VolumeSnapshotAttributesType {
return &VolumeSnapshotAttributesType{}
} | [
-0.16346098482608795,
-1.1366424560546875,
0.1419016569852829,
0.03967665880918503,
-0.7748569846153259,
-0.7780477404594421,
-0.4244334399700165,
0.6084756255149841,
1.1960121393203735,
-0.04265287145972252,
0.15368159115314484,
-0.8454208970069885,
1.1046791076660156,
-0.5344313979148865... |
func (o *VolumeSnapshotAttributesType) ToXML() (string, error) {
output, err := xml.MarshalIndent(o, " ", " ")
if err != nil {
log.Errorf("error: %v", err)
}
return string(output), err
} | [
0.18390394747257233,
-0.7568339705467224,
0.4525853991508484,
-0.0749119445681572,
-0.7081672549247742,
0.00777472835034132,
0.38387739658355713,
0.5175130367279053,
1.4813202619552612,
0.8755924105644226,
0.589493989944458,
-0.14539237320423126,
-0.027318164706230164,
-0.534881591796875,
... |
func (o VolumeSnapshotAttributesType) String() string {
return ToString(reflect.ValueOf(o))
} | [
-0.23269955813884735,
-1.2541675567626953,
0.0279508326202631,
-0.384075403213501,
-0.463702529668808,
0.18681280314922333,
0.5361812710762024,
-0.4026060104370117,
1.0835171937942505,
0.8369958996772766,
0.5055102109909058,
0.11633243411779404,
1.068901777267456,
-1.1157124042510986,
0.... |
func (o *VolumeSnapshotAttributesType) AutoSnapshotsEnabled() bool {
var r bool
if o.AutoSnapshotsEnabledPtr == nil {
return r
}
r = *o.AutoSnapshotsEnabledPtr
return r
} | [
-0.4640204608440399,
-0.3854463994503021,
0.22755137085914612,
0.7022801637649536,
-0.7578223347663879,
0.04113440588116646,
-0.1471121460199356,
0.46615341305732727,
0.9779627919197083,
0.4596898853778839,
-1.334687352180481,
-0.3600209057331085,
0.2653411030769348,
-0.3739739656448364,
... |
func (o *VolumeSnapshotAttributesType) SetAutoSnapshotsEnabled(newValue bool) *VolumeSnapshotAttributesType {
o.AutoSnapshotsEnabledPtr = &newValue
return o
} | [
-0.5918223857879639,
-0.8629117608070374,
0.14860877394676208,
0.08697240799665451,
-0.6730237603187561,
0.2193576842546463,
-0.2749169170856476,
0.4771997034549713,
1.0016688108444214,
0.5089493989944458,
-1.0837318897247314,
-0.1797770857810974,
0.961489737033844,
-0.06163749843835831,
... |
func (o *VolumeSnapshotAttributesType) SnapdirAccessEnabled() bool {
var r bool
if o.SnapdirAccessEnabledPtr == nil {
return r
}
r = *o.SnapdirAccessEnabledPtr
return r
} | [
-1.1225701570510864,
-0.2687537670135498,
0.5128116607666016,
-0.11757486313581467,
-1.0009264945983887,
0.2002568393945694,
0.7907116413116455,
0.6089866161346436,
1.1332180500030518,
0.053219884634017944,
-0.5479593873023987,
-0.4253740608692169,
0.14922258257865906,
-0.4865950644016266,... |
func (o *VolumeSnapshotAttributesType) SetSnapdirAccessEnabled(newValue bool) *VolumeSnapshotAttributesType {
o.SnapdirAccessEnabledPtr = &newValue
return o
} | [
-1.1110832691192627,
-0.4408945143222809,
0.3514479994773865,
-0.9000136852264404,
-1.6074063777923584,
0.4236876964569092,
1.067320704460144,
0.5795263648033142,
1.1043527126312256,
-0.19633224606513977,
0.6036762595176697,
-0.3530063331127167,
0.8179908990859985,
-0.07234556972980499,
... |
func (o *VolumeSnapshotAttributesType) SnapshotCloneDependencyEnabled() bool {
var r bool
if o.SnapshotCloneDependencyEnabledPtr == nil {
return r
}
r = *o.SnapshotCloneDependencyEnabledPtr
return r
} | [
-0.39825719594955444,
-0.004235052037984133,
0.5324875712394714,
-0.003192685777321458,
-0.46968191862106323,
0.8560373187065125,
0.1580454707145691,
0.25893282890319824,
1.163861870765686,
0.3482619822025299,
-0.6958913207054138,
0.007688416168093681,
-0.8794048428535461,
0.37611615657806... |
func (o *VolumeSnapshotAttributesType) SetSnapshotCloneDependencyEnabled(newValue bool) *VolumeSnapshotAttributesType {
o.SnapshotCloneDependencyEnabledPtr = &newValue
return o
} | [
-0.3454663157463074,
-0.3476828634738922,
0.3935440182685852,
-0.08455859124660492,
-0.7862057089805603,
1.1870033740997314,
0.5867266058921814,
0.5170240998268127,
1.0100184679031372,
0.10698693245649338,
-0.7736883163452148,
-0.23888491094112396,
-0.08939430862665176,
0.4984291195869446,... |
func (o *VolumeSnapshotAttributesType) SnapshotCount() int {
var r int
if o.SnapshotCountPtr == nil {
return r
}
r = *o.SnapshotCountPtr
return r
} | [
0.1390307992696762,
-0.26316332817077637,
0.5678176879882812,
-0.20340506732463837,
-0.619646430015564,
-0.1636030077934265,
0.9744617342948914,
0.1407489776611328,
1.0809149742126465,
-0.40987610816955566,
0.22832536697387695,
-0.7064997553825378,
0.6531922221183777,
-0.08044494688510895,... |
func (o *VolumeSnapshotAttributesType) SetSnapshotCount(newValue int) *VolumeSnapshotAttributesType {
o.SnapshotCountPtr = &newValue
return o
} | [
-0.703032374382019,
-0.30043214559555054,
0.48412442207336426,
-0.4368339776992798,
-1.507030725479126,
0.345981627702713,
0.6104488968849182,
0.15569359064102173,
0.4940360486507416,
-0.2629259526729584,
-0.5773783922195435,
-0.5671504735946655,
1.0374137163162231,
0.39418917894363403,
... |
func (o *VolumeSnapshotAttributesType) SnapshotPolicy() string {
var r string
if o.SnapshotPolicyPtr == nil {
return r
}
r = *o.SnapshotPolicyPtr
return r
} | [
-0.5946756601333618,
-0.4379364252090454,
0.23830634355545044,
-0.10921765118837357,
-0.17816343903541565,
0.5338081121444702,
0.27087411284446716,
-0.20577989518642426,
1.2422184944152832,
0.191229447722435,
0.14284472167491913,
-0.7820337414741516,
0.675646960735321,
-0.460441917181015,
... |
func (o *VolumeSnapshotAttributesType) SetSnapshotPolicy(newValue string) *VolumeSnapshotAttributesType {
o.SnapshotPolicyPtr = &newValue
return o
} | [
-1.0450406074523926,
-0.4858533442020416,
0.14822520315647125,
-0.36722859740257263,
-0.8382249474525452,
0.6276170015335083,
0.24441267549991608,
0.08961944282054901,
0.5542904734611511,
0.5400123000144958,
-0.5173840522766113,
-0.4044065773487091,
1.191118597984314,
0.09437389671802521,
... |
func LoadbalanceIndector(sd float64, mean float64, zoneNum int) float64 {
return 100 - (100*(sd/mean))/math.Sqrt(float64(zoneNum))
} | [
0.5284343361854553,
0.11280306428670883,
0.5818959474563599,
-0.2844969630241394,
-0.6156821846961975,
0.46007612347602844,
0.2660377621650696,
-0.8621991872787476,
0.666668713092804,
0.48771339654922485,
1.021144151687622,
0.6215834021568298,
-0.5652403831481934,
-0.19409269094467163,
0... |
func CalculateMean(appNum int, zoneNum int) float64 {
x := float64(appNum / zoneNum)
return x
} | [
-0.548189640045166,
-0.4777511954307556,
0.4546055793762207,
0.721390962600708,
-0.6208994388580322,
0.6625040769577026,
0.08896732330322266,
0.4657963514328003,
0.3632889688014984,
0.6828524470329285,
-0.2663896083831787,
0.33752116560935974,
-0.9400041699409485,
0.06858498603105545,
0.... |
func CalculateSD(appNuminEacZone map[string]int, appNum int, zoneNum int, mean float64) float64 {
var sum, x float64
for _, v := range appNuminEacZone {
x = float64(v) - mean
sum = sum + math.Pow(x, 2)
}
fmt.Println("sum=", sum)
sd := float64(math.Sqrt(sum / float64(zoneNum)))
return sd
} | [
0.4056921899318695,
-0.4173281192779541,
0.772974967956543,
0.8984769582748413,
-0.7937150001525879,
0.8993374705314636,
0.7000061869621277,
0.32343700528144836,
0.5480519533157349,
-0.036357250064611435,
-0.09503845125436783,
0.05160830169916153,
-0.5025543570518494,
-0.029069125652313232... |
func CountAppInEachZone(mapping map[string]string, zoneNum int) map[string]int {
var zoneName string
AppNumInEachZone := make(map[string]int, zoneNum)
count := 0
for i := 0; i < zoneNum; i++ {
zoneName = "zone" + strconv.Itoa(i)
count = 0
for _, v := range mapping {
if v == zoneName {
count++
}
}
... | [
-0.1474263072013855,
-1.273380994796753,
0.7865138649940491,
0.059830255806446075,
-0.8913717865943909,
-0.005750657524913549,
1.0949349403381348,
0.6940166354179382,
0.24184954166412354,
0.6701576113700867,
-0.47119489312171936,
-0.1314721554517746,
0.1238815113902092,
0.47023701667785645... |
func NewMongoAppRepository(dsn string, refreshTime time.Duration) (*MongoRepository, error) {
log.WithField("dsn", dsn).Debug("Trying to connect to MongoDB...")
session, err := mgo.Dial(dsn)
if err != nil {
return nil, errors.Wrap(err, "could not connect to mongodb")
}
log.Debug("Connected to MongoDB")
session... | [
0.34298568964004517,
-0.03375837951898575,
0.18787141144275665,
0.1606626808643341,
-0.2013963907957077,
-0.788852870464325,
-1.0263012647628784,
0.05098504573106766,
0.6992107629776001,
0.7846688628196716,
-0.23748421669006348,
-0.7551713585853577,
-0.16304539144039154,
0.5750010013580322... |
func (r *MongoRepository) Close() error {
r.Session.Close()
return nil
} | [
-0.17831064760684967,
-0.38291946053504944,
0.2289445549249649,
0.20967479050159454,
0.21173053979873657,
-0.37196043133735657,
-0.24621398746967316,
-0.9695647954940796,
0.578449547290802,
-0.24864941835403442,
0.5176745057106018,
-0.23832769691944122,
-0.8463068604469299,
0.4739965200424... |
func (r *MongoRepository) Listen(ctx context.Context, cfgChan <-chan ConfigurationMessage) {
go func() {
log.Debug("Listening for changes on the provider...")
for {
select {
case cfg := <-cfgChan:
switch cfg.Operation {
case AddedOperation:
err := r.add(cfg.Configuration)
if err != nil {
... | [
0.025010257959365845,
0.1606805920600891,
0.4673379361629486,
-0.217970609664917,
0.7281743288040161,
-0.3658269941806793,
0.34251654148101807,
-0.009584992192685604,
0.13598188757896423,
1.26393461227417,
-0.22676454484462738,
-0.13059410452842712,
-0.6698634624481201,
0.3072953224182129,... |
func (r *MongoRepository) Watch(ctx context.Context, cfgChan chan<- ConfigurationChanged) {
t := time.NewTicker(r.refreshTime)
go func(refreshTicker *time.Ticker) {
defer refreshTicker.Stop()
log.Debug("Watching Provider...")
for {
select {
case <-refreshTicker.C:
defs, err := r.FindAll()
if err !... | [
0.11330466717481613,
0.17896771430969238,
0.33488911390304565,
0.41409361362457275,
0.720064640045166,
-0.054607708007097244,
0.3672771155834198,
-0.9889519810676575,
-0.08467615395784378,
0.5070131421089172,
-0.6602147817611694,
0.9127576351165771,
0.42169898748397827,
0.8237700462341309,... |
func (r *MongoRepository) FindAll() ([]*Definition, error) {
var result []*Definition
session, coll := r.getSession()
defer session.Close()
// sort by name to have the same order all the time - for easier comparison
err := coll.Find(nil).Sort("name").All(&result)
if err != nil {
return nil, err
}
return res... | [
0.18831045925617218,
-0.05169398710131645,
0.42242431640625,
1.288893699645996,
0.8622413277626038,
-0.4772549271583557,
-0.5984179973602295,
-0.8229122757911682,
-0.13503438234329224,
0.18649347126483917,
-0.5884361863136292,
-0.08631392568349838,
-0.42577555775642395,
1.601808786392212,
... |
func (r *MongoRepository) add(definition *Definition) error {
session, coll := r.getSession()
defer session.Close()
isValid, err := definition.Validate()
if false == isValid && err != nil {
log.WithError(err).Error("Validation errors")
return err
}
_, err = coll.Upsert(bson.M{"name": definition.Name}, defin... | [
-0.4589863121509552,
-0.10948610305786133,
0.7110941410064697,
0.1600828766822815,
0.8090118169784546,
0.00012666052498389035,
-0.28805652260780334,
0.5103281736373901,
0.6277058720588684,
0.5387181043624878,
-0.028824152424931526,
-0.710537850856781,
-0.47683432698249817,
0.61366564035415... |
func (r *MongoRepository) remove(name string) error {
session, coll := r.getSession()
defer session.Close()
err := coll.Remove(bson.M{"name": name})
if err != nil {
if err == mgo.ErrNotFound {
return ErrAPIDefinitionNotFound
}
log.WithField("name", name).Error("There was an error removing the resource")
... | [
-0.2256685048341751,
0.05119028687477112,
0.2882685959339142,
-0.44130054116249084,
-0.5085740685462952,
-0.7342099547386169,
-0.7398519515991211,
0.2823754847049713,
0.8637449741363525,
0.9132080078125,
-0.4547290802001953,
-0.650018572807312,
-0.4801349639892578,
0.30177727341651917,
0... |
func (t *Topic) Publish(data interface{}) error {
m, e := newMessage(data)
if e != nil {
return e
}
return t.publish(*m)
} | [
-0.16957223415374756,
0.5377451181411743,
0.21571016311645508,
0.5039801597595215,
0.15994183719158173,
-0.14813335239887238,
-0.3016863763332367,
-0.5363946557044983,
-0.47285452485084534,
-0.31438809633255005,
0.54132080078125,
-0.4711095690727234,
-1.2090245485305786,
1.1919453144073486... |
func (m2xClient *M2xClient) CreateTrigger(resource string, trigger map[string]string) (*Trigger, *ErrorMessage) {
data, err := json.Marshal(trigger)
if err != nil {
return nil, simpleErrorMessage(err, 0)
}
result, statusCode, postErr := post(m2xClient.ApiBase+resource+"/triggers", data)
if postErr != nil {
re... | [
-0.8381916880607605,
-0.4826667010784149,
0.6745519042015076,
0.2985370457172394,
-0.1702776402235031,
-0.3554697334766388,
-0.8570866584777832,
-0.47169217467308044,
-0.5894001722335815,
-0.22939631342887878,
-0.4934275150299072,
0.1394086480140686,
-1.1197075843811035,
-0.305786490440368... |
func (m2xClient *M2xClient) DeleteTrigger(resource string, id string) *ErrorMessage {
result, statusCode, err := delete(m2xClient.ApiBase+resource+"/triggers/", id)
if err != nil {
return simpleErrorMessage(err, statusCode)
}
if statusCode == 200 {
return nil
}
return generateErrorMessage(result, statusCode)
... | [
-0.6032180786132812,
-0.09944363683462143,
0.5182074308395386,
0.12019509822130203,
-0.3505464494228363,
-0.9581263065338135,
-0.5849899649620056,
-0.1472189724445343,
0.009857846423983574,
-0.4175203740596771,
-0.5176244974136353,
0.6743075251579285,
-0.6202338933944702,
0.172300219535827... |
func (m2xClient *M2xClient) Triggers(resource string) (*Triggers, *ErrorMessage) {
result, statusCode, err := get(m2xClient.ApiBase + resource + "/triggers")
if err != nil {
return nil, simpleErrorMessage(err, statusCode)
}
if statusCode == 200 {
data, err := parseTriggers(result)
if err != nil {
return ni... | [
-0.9514118432998657,
0.03645429015159607,
0.5524344444274902,
0.08906292170286179,
-0.12158741056919098,
-0.6877326369285583,
-0.3740730881690979,
-0.6738757491111755,
0.0151508878916502,
-0.2833203971385956,
-0.8734488487243652,
0.2613007128238678,
-0.45798900723457336,
-0.408222913742065... |
func (m2xClient *M2xClient) Trigger(resource string, id string) (*Trigger, *ErrorMessage) {
result, statusCode, err := get(m2xClient.ApiBase + resource + "/triggers/" + id)
if err != nil {
return nil, simpleErrorMessage(err, statusCode)
}
if statusCode == 200 {
data, err := parseTrigger(result)
if err != nil ... | [
-0.9479023814201355,
0.34842976927757263,
0.3878673017024994,
0.28041622042655945,
-0.3176928758621216,
-0.8716105222702026,
-0.6442667841911316,
-0.27340373396873474,
-0.26581552624702454,
-0.30476057529449463,
-1.0977296829223633,
0.8655074834823608,
-0.6467350125312805,
-0.7152246236801... |
func (m2xClient *M2xClient) UpdateTrigger(resource string, id string, updateData map[string]string) *ErrorMessage {
data, err := json.Marshal(updateData)
if err != nil {
return simpleErrorMessage(err, 0)
}
result, statusCode, postErr := put(m2xClient.ApiBase+resource+"/triggers/"+id, data)
if postErr != nil {
... | [
-1.708420991897583,
-0.7462475299835205,
0.6475117206573486,
0.0927668884396553,
-0.629671573638916,
-0.5566571950912476,
-0.8587040305137634,
-0.2665882110595703,
-0.31594374775886536,
0.30620133876800537,
-0.9517059326171875,
0.8160004019737244,
-0.754652738571167,
-0.17568595707416534,
... |
func (m2xClient *M2xClient) TestTrigger(resource string, name string) *ErrorMessage {
var empty []byte
result, statusCode, postErr := post(m2xClient.ApiBase+resource+"/triggers/"+name+"/test", empty)
if postErr != nil {
return simpleErrorMessage(postErr, statusCode)
}
if statusCode == 204 {
return nil
}
ret... | [
-0.6877371668815613,
0.19982017576694489,
0.5192869901657104,
-0.12288575619459152,
-0.2860698997974396,
-0.9930335283279419,
-0.4493107497692108,
-0.7597984671592712,
0.3870047926902771,
-0.8779979944229126,
-0.9330329895019531,
0.2846737205982208,
-1.3652749061584473,
-0.1712120771408081... |
func parseTriggers(data []byte) (*Triggers, error) {
triggers := &Triggers{}
err := json.Unmarshal(data, &triggers)
if err != nil {
return nil, err
}
return triggers, nil
} | [
-0.2783319354057312,
0.246542826294899,
0.2991671562194824,
-0.9437397122383118,
-0.8179152011871338,
-0.6941377520561218,
-0.3800296187400818,
-0.400104284286499,
0.21506676077842712,
0.056161414831876755,
-1.4652800559997559,
-0.3937329351902008,
-0.8742050528526306,
-0.09811947494745255... |
func parseTrigger(data []byte) (*Trigger, error) {
trigger := &Trigger{}
err := json.Unmarshal(data, &trigger)
if err != nil {
return nil, err
}
return trigger, nil
} | [
-0.4326619803905487,
0.44806209206581116,
0.4102739095687866,
-0.45445510745048523,
-1.197638988494873,
-0.8679234981536865,
-0.556884229183197,
-0.07191477715969086,
-0.19650857150554657,
-0.0896289199590683,
-1.6977450847625732,
-0.15275637805461884,
-0.5979036092758179,
-0.3298777341842... |
func ParseTriggerEvent(data []byte) (*TriggerEvent, error) {
triggerEvent := &TriggerEvent{}
err := json.Unmarshal(data, &triggerEvent)
if err != nil {
return nil, err
}
return triggerEvent, nil
} | [
-0.03225862234830856,
-0.07334700226783752,
0.4406276047229767,
-0.5877416729927063,
-0.9833918213844299,
-0.6182519793510437,
-0.15809810161590576,
0.280236154794693,
-0.005907197017222643,
0.35054734349250793,
-1.35982084274292,
0.1466679871082306,
-0.9186333417892456,
-0.290985614061355... |
func (o MagneticStoreWritePropertiesPropertiesOutput) EnableMagneticStoreWrites() pulumi.BoolOutput {
return o.ApplyT(func(v MagneticStoreWritePropertiesProperties) bool { return v.EnableMagneticStoreWrites }).(pulumi.BoolOutput)
} | [
0.1931237280368805,
-0.1865595281124115,
0.5665401816368103,
-0.48829400539398193,
0.6806421875953674,
0.6405028104782104,
-0.4305087924003601,
0.9118120670318604,
0.7188656330108643,
0.03368106856942177,
0.09758398681879044,
0.28962257504463196,
-0.7061225771903992,
-1.0136557817459106,
... |
func (o MagneticStoreWritePropertiesPropertiesOutput) MagneticStoreRejectedDataLocation() MagneticStoreWritePropertiesPropertiesMagneticStoreRejectedDataLocationPropertiesPtrOutput {
return o.ApplyT(func(v MagneticStoreWritePropertiesProperties) *MagneticStoreWritePropertiesPropertiesMagneticStoreRejectedDataLocationP... | [
-0.37517476081848145,
-0.06789010763168335,
0.42666369676589966,
-1.441034197807312,
-0.3337576389312744,
-0.07149859517812729,
0.06424570828676224,
1.1309195756912231,
0.9601195454597473,
-1.0361144542694092,
0.10886646062135696,
0.3351278305053711,
0.04420217126607895,
-1.712274670600891... |
func (o MagneticStoreWritePropertiesPropertiesPtrOutput) EnableMagneticStoreWrites() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *MagneticStoreWritePropertiesProperties) *bool {
if v == nil {
return nil
}
return &v.EnableMagneticStoreWrites
}).(pulumi.BoolPtrOutput)
} | [
0.2793274521827698,
-0.09338114410638809,
0.5666510462760925,
-0.5457461476325989,
0.8373263478279114,
0.46757936477661133,
-0.31272247433662415,
0.9431633949279785,
0.6677467823028564,
0.08464492112398148,
0.08728812634944916,
0.16543544828891754,
-0.764835774898529,
-0.9535881876945496,
... |
func (o MagneticStoreWritePropertiesPropertiesPtrOutput) MagneticStoreRejectedDataLocation() MagneticStoreWritePropertiesPropertiesMagneticStoreRejectedDataLocationPropertiesPtrOutput {
return o.ApplyT(func(v *MagneticStoreWritePropertiesProperties) *MagneticStoreWritePropertiesPropertiesMagneticStoreRejectedDataLocat... | [
-0.3452175259590149,
-0.07298944145441055,
0.46882203221321106,
-1.5054749250411987,
-0.21001721918582916,
-0.17505891621112823,
0.050526972860097885,
1.011919379234314,
0.9268885254859924,
-1.0602947473526,
0.2034112811088562,
0.26335009932518005,
-0.029452364891767502,
-1.651858568191528... |
func (o MagneticStoreWritePropertiesPropertiesMagneticStoreRejectedDataLocationPropertiesOutput) S3Configuration() MagneticStoreWritePropertiesPropertiesMagneticStoreRejectedDataLocationPropertiesS3ConfigurationPropertiesPtrOutput {
return o.ApplyT(func(v MagneticStoreWritePropertiesPropertiesMagneticStoreRejectedData... | [
0.25502052903175354,
-0.14968091249465942,
0.30632254481315613,
-0.7519394755363464,
-0.04424120485782623,
0.37671515345573425,
0.4771532416343689,
1.081844687461853,
1.3630036115646362,
-0.3969973027706146,
-0.14843705296516418,
0.37869247794151306,
0.5775282979011536,
-1.390486478805542,... |
func (o MagneticStoreWritePropertiesPropertiesMagneticStoreRejectedDataLocationPropertiesPtrOutput) S3Configuration() MagneticStoreWritePropertiesPropertiesMagneticStoreRejectedDataLocationPropertiesS3ConfigurationPropertiesPtrOutput {
return o.ApplyT(func(v *MagneticStoreWritePropertiesPropertiesMagneticStoreRejected... | [
0.1529056429862976,
-0.010850157588720322,
0.271182119846344,
-0.8134917616844177,
-0.028822822496294975,
0.1960286945104599,
0.4259958267211914,
0.9917084574699402,
1.4142705202102661,
-0.5561327338218689,
-0.08513105660676956,
0.33264613151550293,
0.3562500476837158,
-1.237915277481079,
... |
func (o MagneticStoreWritePropertiesPropertiesMagneticStoreRejectedDataLocationPropertiesS3ConfigurationPropertiesOutput) BucketName() pulumi.StringOutput {
return o.ApplyT(func(v MagneticStoreWritePropertiesPropertiesMagneticStoreRejectedDataLocationPropertiesS3ConfigurationProperties) string {
return v.BucketName
... | [
0.09011534601449966,
0.2830187678337097,
0.49704986810684204,
0.43399012088775635,
0.022436339408159256,
0.6054462790489197,
0.8878791332244873,
-0.07202153652906418,
0.26061588525772095,
-0.2653139531612396,
0.277921199798584,
0.29965439438819885,
1.50346839427948,
-1.2032148838043213,
... |
func (o MagneticStoreWritePropertiesPropertiesMagneticStoreRejectedDataLocationPropertiesS3ConfigurationPropertiesOutput) EncryptionOption() pulumi.StringOutput {
return o.ApplyT(func(v MagneticStoreWritePropertiesPropertiesMagneticStoreRejectedDataLocationPropertiesS3ConfigurationProperties) string {
return v.Encry... | [
0.2271803468465805,
0.33308273553848267,
0.3005788326263428,
0.5435380935668945,
0.6000002026557922,
0.8736864328384399,
0.985144853591919,
-0.7000241279602051,
1.1659656763076782,
0.5965402722358704,
-0.15129724144935608,
0.23555701971054077,
0.4231662154197693,
-1.3336368799209595,
-0.... |
func (o MagneticStoreWritePropertiesPropertiesMagneticStoreRejectedDataLocationPropertiesS3ConfigurationPropertiesOutput) KmsKeyId() pulumi.StringPtrOutput {
return o.ApplyT(func(v MagneticStoreWritePropertiesPropertiesMagneticStoreRejectedDataLocationPropertiesS3ConfigurationProperties) *string {
return v.KmsKeyId
... | [
0.8944637775421143,
-0.23354241251945496,
0.28555718064308167,
0.13192862272262573,
0.008842621929943562,
0.7017941474914551,
-0.1570352166891098,
0.23328529298305511,
0.6206169724464417,
0.06991180777549744,
0.20044644176959991,
0.8511613607406616,
0.030572276562452316,
-0.484865218400955... |
func (o MagneticStoreWritePropertiesPropertiesMagneticStoreRejectedDataLocationPropertiesS3ConfigurationPropertiesOutput) ObjectKeyPrefix() pulumi.StringPtrOutput {
return o.ApplyT(func(v MagneticStoreWritePropertiesPropertiesMagneticStoreRejectedDataLocationPropertiesS3ConfigurationProperties) *string {
return v.Ob... | [
-0.169883593916893,
-0.29422101378440857,
0.6663322448730469,
0.13326938450336456,
0.09506137669086456,
0.4066184461116791,
0.3022766709327698,
-0.4465049207210541,
1.2087152004241943,
0.9468289613723755,
-0.4512085020542145,
0.6675070524215698,
0.6315301060676575,
-1.4353523254394531,
-... |
func (o MagneticStoreWritePropertiesPropertiesMagneticStoreRejectedDataLocationPropertiesS3ConfigurationPropertiesPtrOutput) BucketName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MagneticStoreWritePropertiesPropertiesMagneticStoreRejectedDataLocationPropertiesS3ConfigurationProperties) *string {
if v == nil ... | [
0.12814760208129883,
0.331551730632782,
0.6650189757347107,
0.5179640054702759,
0.18351423740386963,
0.2208399474620819,
0.9235300421714783,
-0.10520502924919128,
0.6854833960533142,
-0.30414173007011414,
0.32797950506210327,
0.29144033789634705,
1.3268946409225464,
-0.9485398530960083,
... |
func (o MagneticStoreWritePropertiesPropertiesMagneticStoreRejectedDataLocationPropertiesS3ConfigurationPropertiesPtrOutput) EncryptionOption() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MagneticStoreWritePropertiesPropertiesMagneticStoreRejectedDataLocationPropertiesS3ConfigurationProperties) *string {
if v =... | [
0.4288330078125,
0.4701555669307709,
0.45758122205734253,
0.45652633905410767,
0.7720690369606018,
0.37967830896377563,
1.024737000465393,
-0.7813221216201782,
1.4144446849822998,
0.5175969004631042,
-0.0984576866030693,
0.08279376477003098,
0.35591766238212585,
-1.1180543899536133,
-0.2... |
func (o MagneticStoreWritePropertiesPropertiesMagneticStoreRejectedDataLocationPropertiesS3ConfigurationPropertiesPtrOutput) KmsKeyId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MagneticStoreWritePropertiesPropertiesMagneticStoreRejectedDataLocationPropertiesS3ConfigurationProperties) *string {
if v == nil {
... | [
0.8902909159660339,
-0.19509506225585938,
0.3416074812412262,
0.09491625428199768,
0.12989337742328644,
0.41974061727523804,
-0.10462145507335663,
-0.01513033639639616,
0.8016027212142944,
-0.0002101789868902415,
0.24161168932914734,
0.7108227014541626,
0.05352427065372467,
-0.160862863063... |
func (o MagneticStoreWritePropertiesPropertiesMagneticStoreRejectedDataLocationPropertiesS3ConfigurationPropertiesPtrOutput) ObjectKeyPrefix() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MagneticStoreWritePropertiesPropertiesMagneticStoreRejectedDataLocationPropertiesS3ConfigurationProperties) *string {
if v ==... | [
-0.07763465493917465,
-0.24948932230472565,
0.7266849875450134,
0.17945560812950134,
0.30560415983200073,
0.12895143032073975,
0.25322818756103516,
-0.5735451579093933,
1.3889590501785278,
0.8621819615364075,
-0.46301278471946716,
0.48964136838912964,
0.5808753967285156,
-1.125324606895446... |
func (o RetentionPropertiesPropertiesOutput) MagneticStoreRetentionPeriodInDays() pulumi.StringPtrOutput {
return o.ApplyT(func(v RetentionPropertiesProperties) *string { return v.MagneticStoreRetentionPeriodInDays }).(pulumi.StringPtrOutput)
} | [
0.1777990311384201,
0.5026978254318237,
0.36085838079452515,
-1.1957392692565918,
0.29102692008018494,
0.5341692566871643,
-0.49654093384742737,
0.1324034035205841,
1.1345722675323486,
-0.7702549695968628,
0.46584850549697876,
0.48848438262939453,
-0.5643230080604553,
-1.5362006425857544,
... |
func (o RetentionPropertiesPropertiesOutput) MemoryStoreRetentionPeriodInHours() pulumi.StringPtrOutput {
return o.ApplyT(func(v RetentionPropertiesProperties) *string { return v.MemoryStoreRetentionPeriodInHours }).(pulumi.StringPtrOutput)
} | [
0.9267077445983887,
-0.11001976579427719,
0.4356434643268585,
-0.4385973811149597,
-0.17820848524570465,
0.7830577492713928,
-0.16408279538154602,
0.6882376074790955,
0.9542455673217773,
-0.2660195529460907,
-0.3230176270008087,
-0.1576383113861084,
-0.8808540105819702,
-2.0649352073669434... |
func (o RetentionPropertiesPropertiesPtrOutput) MagneticStoreRetentionPeriodInDays() pulumi.StringPtrOutput {
return o.ApplyT(func(v *RetentionPropertiesProperties) *string {
if v == nil {
return nil
}
return v.MagneticStoreRetentionPeriodInDays
}).(pulumi.StringPtrOutput)
} | [
0.29017484188079834,
0.4752897024154663,
0.3386364281177521,
-1.2315698862075806,
0.3811376690864563,
0.4654105603694916,
-0.5057893991470337,
0.04528824985027313,
1.1526026725769043,
-0.7517279982566833,
0.49212077260017395,
0.3022862374782562,
-0.5519442558288574,
-1.2914046049118042,
... |
func (o RetentionPropertiesPropertiesPtrOutput) MemoryStoreRetentionPeriodInHours() pulumi.StringPtrOutput {
return o.ApplyT(func(v *RetentionPropertiesProperties) *string {
if v == nil {
return nil
}
return v.MemoryStoreRetentionPeriodInHours
}).(pulumi.StringPtrOutput)
} | [
0.972541868686676,
-0.19357600808143616,
0.40805986523628235,
-0.46358823776245117,
-0.005129117984324694,
0.700509250164032,
-0.17786942422389984,
0.49905264377593994,
1.0045528411865234,
-0.26574474573135376,
-0.25895577669143677,
-0.4233413338661194,
-0.9071316123008728,
-1.823751688003... |
func run(validator interface{}, v interface{}) (error, error) {
r, err := reflectr.
Struct(validator).
Method("Validate").
Returns(reflectr.ErrorType).
Call(v)
if err != nil {
return nil, errRunValidator
}
return interfaceToError(r[0]), nil
} | [
-1.1937819719314575,
-0.38363322615623474,
0.49383455514907837,
0.020339950919151306,
-0.5580863356590271,
-0.052144598215818405,
0.4312460720539093,
0.0621352456510067,
0.1909756362438202,
-0.07674352824687958,
-0.5275098085403442,
0.21349705755710602,
-0.6532449722290039,
0.3929767906665... |
func UpdateDevfileContent(path string, handlers []DevfileUpdater) {
if len(handlers) == 0 {
//Nothing to do => skip
return
}
d, err := parser.ParseDevfile(parser.ParserArgs{
Path: path,
FlattenedDevfile: pointer.Bool(false),
SetBooleanDefaults: pointer.Bool(false),
})
Expect(err).NotTo(H... | [
-0.9092931747436523,
-0.3408893644809723,
0.730571448802948,
0.24957002699375153,
-0.2850661277770996,
1.1545854806900024,
0.8616228103637695,
0.25313621759414673,
-0.9073370695114136,
-0.4366053640842438,
-0.11755068600177765,
-1.0735857486724854,
-0.35936713218688965,
0.2649415135383606,... |
func (f *FileWriterFactory) MakeObject() (*pool.PooledObject, error) {
f.mu.Lock()
defer f.mu.Unlock()
f.lastSeqNo += 1
fileWriter := NewFileWriter(f.app, f.lastSeqNo)
return pool.NewPooledObject(fileWriter), nil
} | [
-0.1935475915670395,
-0.8935396075248718,
0.44886526465415955,
-0.2710629999637604,
-0.24341247975826263,
0.3413454592227936,
1.2969826459884644,
-0.13571353256702423,
-0.855741024017334,
-0.733737051486969,
-0.09122224897146225,
-0.5669723749160767,
0.6903374791145325,
-0.9161888360977173... |
func Archive(inFilePath string, writer io.Writer, progress ProgressFunc) (err error) {
var zipWriter *zip.Writer
var zipFileWriter io.Writer
var zipHeader *zip.FileHeader
var archivePath, relativeFilePath, basePath string
var file *os.File
zipWriter = zip.NewWriter(writer)
basePath = filepath.Dir(inFilePath)
... | [
0.2099284529685974,
-1.1511391401290894,
0.9809671640396118,
0.05411148816347122,
-0.7963146567344666,
0.1549897938966751,
1.412075400352478,
-0.33606192469596863,
-0.3685901165008545,
0.05651766061782837,
0.442961186170578,
-0.6765335202217102,
-0.633432924747467,
0.25985315442085266,
-... |
func ArchiveFile(inFilePath string, outFilePath string, progress ProgressFunc) (err error) {
var outFile *os.File
outFile, err = os.Create(outFilePath)
if err == nil {
err = Archive(inFilePath, outFile, progress)
outFile.Sync()
outFile.Close()
}
return
} | [
0.6697756052017212,
-0.06347206234931946,
0.5911250114440918,
0.43870964646339417,
-0.2150527536869049,
0.665645956993103,
0.8827008605003357,
0.2025085985660553,
-1.558750867843628,
0.40382713079452515,
0.5085315704345703,
-0.09412353485822678,
-0.6993520855903625,
-0.5528770685195923,
... |
func Unarchive(reader io.ReaderAt, readerSize int64, outFilePath string, progress ProgressFunc) (err error) {
var zipReader *zip.Reader
var j int
zipReader, err = zip.NewReader(reader, readerSize)
if err == nil {
for j = 0; j < len(zipReader.File) && err == nil; j++ {
err = unarchiveFile(zipReader.File[j], ou... | [
-0.3156454563140869,
-0.30087971687316895,
0.725257158279419,
-0.4215899109840393,
-0.18696361780166626,
-0.8005071878433228,
0.6665859818458557,
0.5157971382141113,
-0.8469876646995544,
0.4016565978527069,
0.702761173248291,
-0.9162279367446899,
-0.7988929748535156,
-0.4312296509742737,
... |
func UnarchiveFile(inFilePath string, outFilePath string, progress ProgressFunc) (err error) {
var inFile *os.File
var inFileInfo os.FileInfo
inFile, err = os.Open(inFilePath)
if err == nil {
inFileInfo, err = inFile.Stat()
if err == nil {
err = Unarchive(inFile, inFileInfo.Size(), outFilePath, progress)
... | [
0.08463870733976364,
-0.12209748476743698,
0.6862559914588928,
-0.2296677976846695,
-0.012010090984404087,
0.31945639848709106,
1.0497756004333496,
0.8955981731414795,
-1.2107058763504028,
0.3013940453529358,
0.39882799983024597,
-0.6056658029556274,
-0.576748788356781,
-0.8398732542991638... |
func extractHTTPRequest(ctx *dsl.Ctx, m dsl.Msg) (*HTTPRequest, error) {
// m.Body is a JSON serialization of an HTTPRequest.
// Parse the HTTPRequest.
var (
js = m.Payload
req = &HTTPRequest{
RequestBodySerialization: dsl.DefaultSerialization,
ResponseBodyDeserialization: dsl.DefaultSerialization,
... | [
-0.42147260904312134,
-0.22872354090213776,
0.8921940326690674,
-0.3453235626220703,
-0.35707294940948486,
-0.7630159854888916,
-0.3083946108818054,
0.1578153520822525,
0.019721468910574913,
0.05854479596018791,
-0.4045717418193817,
0.4798479974269867,
0.3658817410469055,
0.415268689393997... |
func CreateConnection(host string, port int) *RabbitmqConnection {
rc := &RabbitmqConnection{Host: host, Port: port}
rc.connectToRabbitMQ()
return rc
} | [
0.6099048852920532,
-1.0305215120315552,
0.4214068353176117,
-0.21662618219852448,
0.0008775603491812944,
-0.13982774317264557,
-0.8945756554603577,
-0.29021742939949036,
-0.8007708787918091,
0.30052006244659424,
0.3136309087276459,
-0.0691433921456337,
-0.7568314671516418,
0.0157156605273... |
func (rc *RabbitmqConnection) connectToRabbitMQ() {
rc.connect()
} | [
-0.15510542690753937,
-1.546134114265442,
0.3400142788887024,
-0.3083778917789459,
0.7797346115112305,
0.25636935234069824,
-0.4558449983596802,
-1.0664998292922974,
-0.9040729403495789,
0.9040015935897827,
-0.012533854693174362,
0.1773904412984848,
-0.3079492151737213,
0.7650573253631592,... |
func (rc *RabbitmqConnection) Reconnect() {
rc.Lock.Lock()
defer rc.Lock.Unlock()
if rc.testConnection() {
rc.Conn.Close()
rc.connect()
}
} | [
0.288259357213974,
-0.9546202421188354,
0.45954394340515137,
0.5365456342697144,
0.12527063488960266,
-0.5451623797416687,
0.05386658385396004,
-0.3582763671875,
-0.24960680305957794,
-0.25277963280677795,
0.6124469041824341,
0.30804669857025146,
-1.5614980459213257,
-0.16022537648677826,
... |
func (rc *RabbitmqConnection) InitChannelAndStartConsuming(taskQueue string, doFunc func(string) string) bool {
for {
ch, err := rc.Conn.Channel()
if err != nil {
failOnError(err, "Failed to open a channel")
return false
}
q, err := ch.QueueDeclare(
taskQueue, // name
false, // durable
fa... | [
0.23794282972812653,
-0.30308282375335693,
1.1346591711044312,
-0.45990297198295593,
0.04704955965280533,
0.10245714336633682,
0.49021002650260925,
0.004730528686195612,
-0.3162859082221985,
0.9013743996620178,
0.46917030215263367,
0.48819756507873535,
-0.5030303597450256,
0.59610217809677... |
func NewConfigMapsInteractorNamespacer(cmns v1.ConfigMapsGetter) InteractorNamespacer {
return cmNamespacer{cmNS: cmns}
} | [
-0.17003698647022247,
-1.520835518836975,
0.010467230342328548,
-0.26202207803726196,
-0.7442197799682617,
0.034780170768499374,
0.16523799300193787,
0.05004682391881943,
0.7541103363037109,
-0.21573461592197418,
-0.07871639728546143,
-1.1916481256484985,
-0.8982536792755127,
0.22807449102... |
func NewConnectorTypeAllOf() *ConnectorTypeAllOf {
this := ConnectorTypeAllOf{}
return &this
} | [
-0.36828944087028503,
-1.3286116123199463,
0.2968835234642029,
0.9863134026527405,
-0.699042797088623,
-1.3734866380691528,
-0.1774154156446457,
-0.5449903011322021,
1.1077194213867188,
-0.312680184841156,
-0.4147721827030182,
-0.8078939318656921,
-0.1967950314283371,
0.6383286118507385,
... |
func NewConnectorTypeAllOfWithDefaults() *ConnectorTypeAllOf {
this := ConnectorTypeAllOf{}
return &this
} | [
-0.131653293967247,
-0.5689811706542969,
0.12720806896686554,
1.0624715089797974,
0.168639674782753,
-1.525123119354248,
-0.8182364106178284,
-0.6279647946357727,
0.7831367254257202,
-0.5226908922195435,
-0.5097147822380066,
-1.5632137060165405,
-0.17423051595687866,
1.1331950426101685,
... |
func (o *ConnectorTypeAllOf) GetName() string {
if o == nil || o.Name == nil {
var ret string
return ret
}
return *o.Name
} | [
0.032033663243055344,
0.23424315452575684,
0.33521604537963867,
0.9374558925628662,
-0.49454590678215027,
-1.1634280681610107,
0.7523826956748962,
-0.4081636071205139,
0.6491071581840515,
0.30927419662475586,
-0.41491997241973877,
-1.8844128847122192,
-0.6130197644233704,
0.990249633789062... |
func (o *ConnectorTypeAllOf) GetNameOk() (*string, bool) {
if o == nil || o.Name == nil {
return nil, false
}
return o.Name, true
} | [
-0.015146393328905106,
-0.145247682929039,
0.5923312902450562,
0.575728714466095,
-0.410580575466156,
0.12330508977174759,
0.23268435895442963,
-0.12156063318252563,
0.1261402666568756,
1.1826467514038086,
-1.122881293296814,
-1.2134487628936768,
0.2980988025665283,
0.6570159196853638,
0... |
func (o *ConnectorTypeAllOf) HasName() bool {
if o != nil && o.Name != nil {
return true
}
return false
} | [
0.11770638823509216,
-0.15672576427459717,
0.3816540241241455,
0.6539628505706787,
-0.2404051125049591,
-0.734399139881134,
0.062066324055194855,
0.1591218113899231,
0.6182436943054199,
0.5392647981643677,
-0.7472047209739685,
-1.6154910326004028,
-0.2810404300689697,
0.5330379009246826,
... |
func (o *ConnectorTypeAllOf) SetName(v string) {
o.Name = &v
} | [
-0.01973283849656582,
-0.1782262921333313,
0.07805822789669037,
0.2744313180446625,
-1.6422836780548096,
-0.765764594078064,
-0.3988346457481384,
-0.8507341146469116,
0.41335487365722656,
0.5713863372802734,
-0.5239142179489136,
0.03760300204157829,
-0.41987067461013794,
0.1268572658300399... |
func (o *ConnectorTypeAllOf) GetVersion() string {
if o == nil || o.Version == nil {
var ret string
return ret
}
return *o.Version
} | [
0.4776882529258728,
-0.17238473892211914,
0.08120699971914291,
1.2632677555084229,
0.1289921998977661,
-0.3041081130504608,
1.3277614116668701,
-0.24793696403503418,
1.1797350645065308,
-0.2072472870349884,
-0.4597568213939667,
-1.8543676137924194,
-0.7613692879676819,
0.5451576709747314,
... |
func (o *ConnectorTypeAllOf) GetVersionOk() (*string, bool) {
if o == nil || o.Version == nil {
return nil, false
}
return o.Version, true
} | [
0.17726106941699982,
-0.49398621916770935,
0.27777099609375,
1.2530397176742554,
-0.03636543080210686,
0.25227680802345276,
0.9359021186828613,
0.5681260824203491,
0.10542119294404984,
1.436545491218567,
-1.1675230264663696,
-1.3551806211471558,
0.2583155632019043,
0.49090975522994995,
0... |
func (o *ConnectorTypeAllOf) HasVersion() bool {
if o != nil && o.Version != nil {
return true
}
return false
} | [
0.3882508873939514,
-0.3379349410533905,
0.19580650329589844,
1.171526312828064,
0.45759445428848267,
-0.2021905779838562,
0.5739434361457825,
0.9482976794242859,
0.6075136065483093,
-0.21339653432369232,
-0.9202413558959961,
-1.7481262683868408,
-0.6016017198562622,
0.1964099109172821,
... |
func (o *ConnectorTypeAllOf) SetVersion(v string) {
o.Version = &v
} | [
0.2607676386833191,
-0.825313925743103,
-0.01223116647452116,
0.7093870639801025,
-0.9822943210601807,
-0.25325846672058105,
-0.25537344813346863,
-0.4744090735912323,
0.4830675721168518,
0.09672687947750092,
-0.5724830031394958,
0.11389600485563278,
-0.6601395606994629,
-0.190637111663818... |
func (o *ConnectorTypeAllOf) GetDescription() string {
if o == nil || o.Description == nil {
var ret string
return ret
}
return *o.Description
} | [
0.7970898151397705,
0.235995814204216,
0.20923291146755219,
1.1164429187774658,
-0.08523436635732651,
-0.5761032104492188,
0.6199203133583069,
-0.43280744552612305,
1.3911646604537964,
-0.06821595877408981,
0.16970400512218475,
-1.6834920644760132,
-0.6859983205795288,
0.9292461276054382,
... |
func (o *ConnectorTypeAllOf) GetDescriptionOk() (*string, bool) {
if o == nil || o.Description == nil {
return nil, false
}
return o.Description, true
} | [
0.3463170826435089,
0.23983041942119598,
0.44387486577033997,
0.6781678199768066,
-0.20864680409431458,
0.5106531977653503,
0.49994388222694397,
0.6152292490005493,
0.19117213785648346,
0.9680558443069458,
-0.09968633949756622,
-1.0268670320510864,
0.3737783133983612,
0.8287524580955505,
... |
func (o *ConnectorTypeAllOf) HasDescription() bool {
if o != nil && o.Description != nil {
return true
}
return false
} | [
0.5966929793357849,
0.28560692071914673,
0.24572773277759552,
0.5956225991249084,
0.3136071264743805,
-0.5747392177581787,
0.21011051535606384,
0.5777952671051025,
1.0490988492965698,
-0.18478263914585114,
-0.3099775016307831,
-0.9734256863594055,
-0.11887563019990921,
0.8970353603363037,
... |
func (o *ConnectorTypeAllOf) SetDescription(v string) {
o.Description = &v
} | [
0.48099902272224426,
-0.16934800148010254,
-0.08747230470180511,
0.38258400559425354,
-0.8256579041481018,
-0.19031356275081635,
-0.4438651204109192,
-0.8352322578430176,
0.6374267935752869,
0.206564798951149,
0.3655911386013031,
0.7887532711029053,
-0.26680150628089905,
0.0095264855772256... |
func (o *ConnectorTypeAllOf) GetJsonSchema() map[string]interface{} {
if o == nil || o.JsonSchema == nil {
var ret map[string]interface{}
return ret
}
return *o.JsonSchema
} | [
-0.7657942175865173,
0.15946626663208008,
0.4861113131046295,
0.6581422090530396,
-0.4698334336280823,
-1.3436511754989624,
-0.1745704561471939,
-0.8850315809249878,
1.0290321111679077,
-0.6517673134803772,
-0.46570420265197754,
-0.39413177967071533,
-0.16256923973560333,
0.461846798658370... |
func (o *ConnectorTypeAllOf) GetJsonSchemaOk() (*map[string]interface{}, bool) {
if o == nil || o.JsonSchema == nil {
return nil, false
}
return o.JsonSchema, true
} | [
-0.6924321055412292,
0.07186110317707062,
0.4282631576061249,
0.1701444685459137,
-0.34883254766464233,
-0.8452219367027283,
0.12021388858556747,
-0.0910668820142746,
0.5092021822929382,
0.39423489570617676,
-0.8801785707473755,
-0.1668073982000351,
0.9173322916030884,
0.5102198123931885,
... |
func (o *ConnectorTypeAllOf) HasJsonSchema() bool {
if o != nil && o.JsonSchema != nil {
return true
}
return false
} | [
-0.05484604462981224,
0.16554957628250122,
0.37665873765945435,
0.1674562692642212,
0.2211024910211563,
-1.8202556371688843,
-0.444385290145874,
-0.2604110836982727,
0.37025442719459534,
-0.9115111827850342,
-0.9207367897033691,
-0.3448875844478607,
0.3531567454338074,
0.5804585218429565,
... |
func mergeTwoSortedLists(l1 *ListNode, l2 *ListNode) *ListNode {
// return another if one is nil
if l1 == nil {
return l2
}
if l2 == nil {
return l1
}
//choose smaller one as head
var head, node *ListNode
if l1.Val < l2.Val {
head = l1
node = l1
l1 = l1.Next
} else {
head = l2
node = l2
l2 = l... | [
0.30403655767440796,
-0.35424503684043884,
1.120895504951477,
-0.09025396406650543,
-0.5772386789321899,
0.14824916422367096,
-1.4127197265625,
-0.8061042428016663,
-0.09690871089696884,
-0.5979940891265869,
-0.38527941703796387,
0.785598874092102,
-0.5370883941650391,
0.6603537201881409,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.