text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (o *EnforcerReport) DefaultOrder() []string { return []string{} }
[ 0.48496222496032715, 0.1882506161928177, 0.290828675031662, 0.348572313785553, 1.6409690380096436, 0.2247183918952942, -0.633085310459137, 0.22024685144424438, 0.23916380107402802, -0.8582560420036316, -0.1363707333803177, -1.2244365215301514, -1.486214518547058, 1.2943540811538696, 0.09...
func (o *EnforcerReport) Doc() string { return `Post a new defender statistics report.` }
[ 1.5970275402069092, 1.03811776638031, 0.5250380635261536, -0.18588420748710632, 0.08802945166826248, 0.749807596206665, 0.25295403599739075, 0.4414794147014618, -0.5476840138435364, -0.8181048631668091, 0.6124359965324402, -0.4475170075893402, -0.015198593027889729, -0.08719614893198013, ...
func (o *EnforcerReport) ToSparse(fields ...string) elemental.SparseIdentifiable { if len(fields) == 0 { // nolint: goimports return &SparseEnforcerReport{ CPULoad: &o.CPULoad, ID: &o.ID, Memory: &o.Memory, Name: &o.Name, Namespace: &o.Namespace, Processes: &o.Processes, Time...
[ 0.4412926137447357, 0.4191347360610962, 0.6052669882774353, -0.6889551281929016, 1.0966321229934692, -0.1003708690404892, -0.4474373757839203, -0.10146789252758026, -0.1638728827238083, 0.03751630708575249, -0.808893620967865, -0.054387133568525314, -1.5235676765441895, -0.7151634693145752...
func (o *EnforcerReport) Patch(sparse elemental.SparseIdentifiable) { if !sparse.Identity().IsEqual(o.Identity()) { panic("cannot patch from a parse with different identity") } so := sparse.(*SparseEnforcerReport) if so.CPULoad != nil { o.CPULoad = *so.CPULoad } if so.ID != nil { o.ID = *so.ID } if so.Me...
[ 0.8077451586723328, -0.47389087080955505, 0.37298744916915894, -1.1594831943511963, 0.5633831024169922, 0.9965700507164001, -0.3576385974884033, 0.5093507766723633, 0.922576367855072, -0.44676443934440613, -0.7093092799186707, 0.6433929800987244, -0.6726755499839783, -0.23057781159877777, ...
func (o *EnforcerReport) DeepCopy() *EnforcerReport { if o == nil { return nil } out := &EnforcerReport{} o.DeepCopyInto(out) return out }
[ 0.48012787103652954, 0.9616957902908325, 0.06314362585544586, 0.23805281519889832, 0.8656342029571533, -0.4150484800338745, 0.9086899757385254, 0.022203776985406876, 0.07953796535730362, -0.991841733455658, -0.7615400552749634, -0.5970150828361511, -1.5637542009353638, -0.7483204007148743,...
func (o *EnforcerReport) DeepCopyInto(out *EnforcerReport) { target, err := copystructure.Copy(o) if err != nil { panic(fmt.Sprintf("Unable to deepcopy EnforcerReport: %s", err)) } *out = *target.(*EnforcerReport) }
[ 0.9095059037208557, 0.42187801003456116, 0.41986915469169617, -0.44532278180122375, 0.05414711683988571, 0.0016777123091742396, 0.5800827145576477, 0.6948017477989197, -0.7130533456802368, -0.3860268294811249, -0.6268666982650757, 0.7284505367279053, -0.6370922327041626, -0.891290366649627...
func (o *EnforcerReport) Validate() error { errors := elemental.Errors{} requiredErrors := elemental.Errors{} if err := elemental.ValidateRequiredString("ID", o.ID); err != nil { requiredErrors = requiredErrors.Append(err) } if err := elemental.ValidateRequiredString("name", o.Name); err != nil { requiredEr...
[ 0.5681592226028442, 0.272962749004364, 0.7794448733329773, -0.6709914803504944, 0.753862738609314, -0.2652689516544342, -0.17977654933929443, -0.09146121144294739, -0.4552772343158722, -0.1611407846212387, 0.07789567112922668, -0.528233528137207, -1.2613106966018677, -0.07628308236598969, ...
func (*EnforcerReport) SpecificationForAttribute(name string) elemental.AttributeSpecification { if v, ok := EnforcerReportAttributesMap[name]; ok { return v } // We could not find it, so let's check on the lower case indexed spec map return EnforcerReportLowerCaseAttributesMap[name] }
[ 0.17374339699745178, -0.5965492129325867, 0.18456736207008362, -1.3331183195114136, 0.05720982328057289, -1.0082544088363647, 0.5924681425094604, -0.5416799187660217, 0.3395264148712158, -0.20184466242790222, 0.8829981088638306, -0.7325829863548279, 0.4277602732181549, 0.04219967499375343,...
func (*EnforcerReport) AttributeSpecifications() map[string]elemental.AttributeSpecification { return EnforcerReportAttributesMap }
[ 0.049412257969379425, -0.21487288177013397, 0.20295043289661407, -1.1019617319107056, 0.5134665369987488, -0.14260879158973694, 0.1358577460050583, -0.030180558562278748, 0.7154490947723389, -0.5211220383644104, -0.3777238130569458, -0.3660886287689209, 0.21304772794246674, -0.112110368907...
func (o *EnforcerReport) ValueForAttribute(name string) interface{} { switch name { case "CPULoad": return o.CPULoad case "ID": return o.ID case "memory": return o.Memory case "name": return o.Name case "namespace": return o.Namespace case "processes": return o.Processes case "timestamp": return ...
[ 0.20088039338588715, -0.3327684998512268, 0.24487024545669556, -1.3903653621673584, 0.15241490304470062, -0.6595369577407837, 0.024711180478334427, -0.6347209215164185, -0.14389580488204956, 0.08182168751955032, 0.25871050357818604, -0.3734520673751831, 0.16455554962158203, 0.2152710556983...
func (o SparseEnforcerReportsList) Identity() elemental.Identity { return EnforcerReportIdentity }
[ 0.52020663022995, 0.08831275999546051, 0.1314963549375534, 0.3595277965068817, 1.859321117401123, 1.1011149883270264, 0.5165826082229614, 0.5494668483734131, 1.3900423049926758, -0.18034599721431732, -0.8001163005828857, -1.1065831184387207, -1.625016450881958, 0.44476982951164246, -0.24...
func (o SparseEnforcerReportsList) Copy() elemental.Identifiables { copy := append(SparseEnforcerReportsList{}, o...) return &copy }
[ -0.041397158056497574, 0.031959641724824905, 0.2958776354789734, 0.2686881721019745, 0.37898388504981995, 1.6102046966552734, -0.10966287553310394, -0.1222565770149231, 0.8013831973075867, 0.7124581336975098, -0.5715704560279846, 0.15532812476158142, -1.0703269243240356, -0.078067578375339...
func (o SparseEnforcerReportsList) Append(objects ...elemental.Identifiable) elemental.Identifiables { out := append(SparseEnforcerReportsList{}, o...) for _, obj := range objects { out = append(out, obj.(*SparseEnforcerReport)) } return out }
[ -0.14630018174648285, 0.13269512355327606, 0.39607223868370056, 0.3093703091144562, 1.3507351875305176, 0.8216063380241394, -0.26821574568748474, 0.39626702666282654, 0.3468955159187317, 0.3034951984882355, -0.7819311022758484, -0.09054988622665405, -0.7178044319152832, 0.37894994020462036...
func (o SparseEnforcerReportsList) List() elemental.IdentifiablesList { out := make(elemental.IdentifiablesList, len(o)) for i := 0; i < len(o); i++ { out[i] = o[i] } return out }
[ 0.5817170739173889, -0.04008878394961357, 0.21710269153118134, 0.21867811679840088, 1.474997878074646, 0.7547639012336731, -0.23072683811187744, 0.6409551501274109, 0.39568161964416504, 0.4974764883518219, -0.9213389158248901, 0.012161731719970703, -0.9446894526481628, -0.13909582793712616...
func (o SparseEnforcerReportsList) DefaultOrder() []string { return []string{} }
[ 0.5405674576759338, 0.40352296829223633, 0.26292720437049866, 0.3676975667476654, 1.7618114948272705, 0.5297126770019531, -1.038260817527771, 0.3798530697822571, 0.4355062246322632, -0.621941864490509, -0.6289359331130981, -0.8801069855690002, -1.5799338817596436, 1.2799564599990845, -0....
func (o SparseEnforcerReportsList) ToPlain() elemental.IdentifiablesList { out := make(elemental.IdentifiablesList, len(o)) for i := 0; i < len(o); i++ { out[i] = o[i].ToPlain() } return out }
[ 0.563552737236023, 0.49788862466812134, 0.548602819442749, -0.6499356031417847, 1.207449197769165, 0.5818923115730286, -0.3199522793292999, 0.16756555438041687, 0.6049745678901672, 0.6501743197441101, -0.7333200573921204, -0.24168534576892853, -1.143980622291565, 0.12794235348701477, -0....
func (o SparseEnforcerReportsList) Version() int { return 1 }
[ 0.36271998286247253, -0.23481866717338562, 0.14928655326366425, 0.10112055391073227, 1.1164923906326294, 0.6057764291763306, 0.7183229327201843, 1.2757457494735718, 0.48239195346832275, 0.24731315672397614, -1.3983068466186523, -0.5428541898727417, -1.5713497400283813, 0.6201977133750916, ...
func NewSparseEnforcerReport() *SparseEnforcerReport { return &SparseEnforcerReport{} }
[ 0.7299764156341553, 0.07453157752752304, -0.23159465193748474, -0.3420821726322174, 0.29679667949676514, -1.1363029479980469, -0.18077942728996277, 0.3145521879196167, 0.12609241902828217, -1.4624053239822388, -0.8646190166473389, -0.32497134804725647, -1.3233734369277954, 0.54970496892929...
func (o *SparseEnforcerReport) Identity() elemental.Identity { return EnforcerReportIdentity }
[ 0.7959955334663391, -0.05349727347493172, 0.1827624887228012, 0.2396550327539444, 1.5629593133926392, 0.90291428565979, 0.808652937412262, 0.27275794744491577, 1.3056989908218384, -0.47097495198249817, -0.11245343089103699, -0.7705681324005127, -1.4268019199371338, -0.10554399341344833, ...
func (o *SparseEnforcerReport) Identifier() string { return "" }
[ 0.9814870357513428, 0.3320577144622803, 0.10144130140542984, -0.8722453117370605, 0.38952481746673584, 0.8052401542663574, 0.965013861656189, 1.157705307006836, 0.9163068532943726, -0.579891562461853, -0.3263237178325653, -0.34077706933021545, -0.8731715679168701, -0.002322440966963768, ...
func (o *SparseEnforcerReport) SetIdentifier(id string) { }
[ -0.00959972944110632, -0.20762643218040466, 0.13471201062202454, -0.3575168550014496, 0.43578851222991943, 0.9772970080375671, 0.5980416536331177, 1.1462221145629883, 0.7524611949920654, -0.21548742055892944, -0.9474298357963562, -0.18977348506450653, -1.1660798788070679, 0.616624057292938...
func (o *SparseEnforcerReport) GetBSON() (interface{}, error) { if o == nil { return nil, nil } s := &mongoAttributesSparseEnforcerReport{} return s, nil }
[ 0.41331911087036133, 1.1941405534744263, 0.5060017704963684, 0.9254240393638611, 1.1327143907546997, -0.12699654698371887, 0.6928869485855103, 0.2430097758769989, 1.1538854837417603, -1.324150800704956, -0.22987951338291168, 0.7453880310058594, -1.7533763647079468, 0.6646100878715515, 1....
func (o *SparseEnforcerReport) SetBSON(raw bson.Raw) error { if o == nil { return nil } s := &mongoAttributesSparseEnforcerReport{} if err := raw.Unmarshal(s); err != nil { return err } return nil }
[ -0.11068211495876312, 1.071100115776062, 0.410476416349411, 0.3052907884120941, 0.21637363731861115, -0.04108946770429611, 0.245475634932518, 0.8235820531845093, 0.9427306652069092, -0.9707873463630676, -0.4233455955982208, 1.0101933479309082, -1.1007611751556396, 0.567984402179718, 0.97...
func (o *SparseEnforcerReport) Version() int { return 1 }
[ 0.4219821095466614, -0.2304103523492813, 0.228175088763237, 0.02179826609790325, 0.9007640480995178, 0.3152194917201996, 1.1445121765136719, 1.1072498559951782, 0.21544581651687622, 0.10784253478050232, -0.853916347026825, -0.31392228603363037, -1.3022868633270264, 0.3627025783061981, 0....
func (o *SparseEnforcerReport) ToPlain() elemental.PlainIdentifiable { out := NewEnforcerReport() if o.CPULoad != nil { out.CPULoad = *o.CPULoad } if o.ID != nil { out.ID = *o.ID } if o.Memory != nil { out.Memory = *o.Memory } if o.Name != nil { out.Name = *o.Name } if o.Namespace != nil { out.Name...
[ 1.2445353269577026, 0.03839937970042229, 0.5127694010734558, -2.3333687782287598, 0.6271347999572754, 0.1456335484981537, -0.5220949053764343, -0.19566002488136292, 0.4447067081928253, 0.0181276835501194, -0.5368752479553223, 0.011451910249888897, -0.8493501543998718, -0.6213817596435547, ...
func (o *SparseEnforcerReport) DeepCopy() *SparseEnforcerReport { if o == nil { return nil } out := &SparseEnforcerReport{} o.DeepCopyInto(out) return out }
[ 0.8140984773635864, 1.0243827104568481, -0.0639045313000679, 0.1077486053109169, 0.5289881229400635, -0.15925778448581696, 0.30432313680648804, 0.22800208628177643, 0.237491637468338, -0.1966031789779663, -0.9516385197639465, -0.25692281126976013, -1.3427996635437012, -0.6025820374488831, ...
func (o *SparseEnforcerReport) DeepCopyInto(out *SparseEnforcerReport) { target, err := copystructure.Copy(o) if err != nil { panic(fmt.Sprintf("Unable to deepcopy SparseEnforcerReport: %s", err)) } *out = *target.(*SparseEnforcerReport) }
[ 1.1302400827407837, 0.5960656404495239, 0.3628270924091339, -0.391084760427475, -0.12708313763141632, 0.13210159540176392, 0.18273015320301056, 0.7950870394706726, -0.5972844362258911, -0.09946294873952866, -0.6336345672607422, 0.8846889734268188, -0.46896740794181824, -0.8473756313323975,...
func binarySearch(tsmemlog *TimestampMemLog, low, high uint64, key Timestamp) (uint64, error) { tslog := (*tsmemlog).tslog if high == low { return high, nil } mid := low + (high-low)/2 tslog[row(mid)].lk.RLock() // Read lock segment mts := tslog[row(mid)].ts[col(mid)] tslog[row(mid)].lk.RUnlock() if key.Eq...
[ -0.20308057963848114, -0.046460121870040894, 0.7304347157478333, -0.07132066041231155, -0.5945960879325867, -0.46497195959091187, 0.16568511724472046, -1.0239640474319458, -0.3066958487033844, 0.12027052044868469, 0.1490795612335205, 0.43011969327926636, -0.5898789763450623, -0.41542237997...
func findMinPos(tsmemlog *TimestampMemLog, low, high uint64) uint64 { tslog := (*tsmemlog).tslog // base cases if high == low { return high } var hts Timestamp mid := low + (high-low)/2 tslog[row(mid)].lk.RLock() // Read lock segment mts := tslog[row(mid)].ts[col(mid)] tslog[row(mid)].lk.RUnlock() tslog[...
[ 0.2155131697654724, -0.4899251163005829, 0.7795631885528564, -0.4333866834640503, -0.839693009853363, -0.5162637829780579, -0.2814273238182068, -1.2742348909378052, -0.25504469871520996, 0.0790456011891365, 0.48859739303588867, -0.37238168716430664, -0.831396758556366, -0.09942588955163956...
func cyclicBinarySearch(tsmemlog *TimestampMemLog, low, high uint64, key Timestamp) (uint64, error) { if (low < 0) || (high > SEGSIZE*LOGSIZE-1) || (low > high) { return SEGSIZE * LOGSIZE, ErrSearchRange } tslog := (*tsmemlog).tslog var currpos, minpos uint64 currpos = atomic.LoadUint64(&tsmemlog.currpos) //...
[ -0.15863758325576782, -0.7203206419944763, 1.1346560716629028, -0.27717453241348267, -0.3027869164943695, -0.4992184042930603, 0.4257486164569855, -1.2286298274993896, -0.5062053203582764, -0.2305024266242981, 0.07344866544008255, 0.5430682301521301, -0.6298692226409912, -0.616243362426757...
func NewCommandStartAllInOne(basename string, out, errout io.Writer) (*cobra.Command, *AllInOneOptions) { options := &AllInOneOptions{ MasterOptions: &MasterOptions{ Output: out, }, ExpireDays: crypto.DefaultCertificateLifetimeInDays, SignerExpireDays: crypto.DefaultCACertificateLifetimeInDays, Outp...
[ 0.3744930922985077, -0.6423778533935547, 0.9681071639060974, 0.5225836038589478, -0.2270984798669815, -0.14245527982711792, 0.26758480072021484, 0.9254592061042786, 0.08704307675361633, 0.028694910928606987, -0.6410330533981323, 0.3467414677143097, -0.09787643700838089, 0.37666046619415283...
func GetAllInOneArgs() (*MasterArgs, *NodeArgs, *ListenArg, *ImageFormatArgs, *KubeConnectionArgs) { masterArgs := NewDefaultMasterArgs() masterArgs.StartAPI = true masterArgs.StartControllers = true masterArgs.OverrideConfig = func(config *configapi.MasterConfig) error { // use node DNS // config.DNSConfig = n...
[ -0.19049227237701416, -0.40735509991645813, 1.0273175239562988, -0.2619198262691498, 0.24130947887897491, -0.21539652347564697, -1.2822353839874268, 0.246694415807724, -0.17012718319892883, -0.3449344038963318, -0.6477338671684265, 0.12193192541599274, -0.7946763634681702, 1.31850481033325...
func (o AllInOneOptions) StartAllInOne() error { if o.PrintIP { host, _, err := net.SplitHostPort(o.NodeArgs.DefaultKubernetesURL.Host) if err != nil { return err } fmt.Fprintf(o.Output, "%s\n", host) return nil } masterOptions := *o.MasterOptions masterOptions.ExpireDays = o.ExpireDays masterOptions....
[ -0.4788374602794647, -0.20007206499576569, 0.8939977288246155, 0.5344172120094299, 0.19002605974674225, -0.10173165798187256, 0.08950507640838623, 0.6369147300720215, 0.21605312824249268, -0.08722830563783646, 0.15155647695064545, 0.5791963338851929, -0.11945381760597229, 0.689887404441833...
func Upsample2D(x *Node, scale int) (*Node, error) { if scale < 1 { return nil, errors.Errorf("Upsample scale %v does not make sense", scale) } xShape := x.Shape() op := newUpsampleOp(xShape, scale-1) retVal, err := ApplyOp(op, x) return retVal, err }
[ -1.0900160074234009, -0.35122695565223694, 0.9241369366645813, -0.04417672008275986, -1.6249154806137085, -0.23895929753780365, -0.4731016159057617, -0.7698638439178467, -0.35391873121261597, 0.7417430281639099, -0.16638150811195374, 0.7559781074523926, 0.37832531332969666, -0.208309665322...
func NewNetBooter(config []byte, l ulog.Logger) (Booter, error) { // The configuration format for a NetBooterDHCPv6 entry is a JSON with the // following structure: // { // "type": "netboot", // "method": "<method>", // "mac": "<mac_addr>", // "override_url": "<url>", // "retries": <num_retr...
[ -0.4360288977622986, -0.03282475844025612, 0.6490505337715149, 0.4436514675617218, -0.4258575141429901, -0.9877893924713135, 0.013642051257193089, -0.644871175289154, 0.013057549484074116, 0.04405417665839195, -0.6473124027252197, -0.83173006772995, -0.09260326623916626, 0.9745550155639648...
func (nb *NetBooter) Boot(debugEnabled bool) error { var bootcmd []string var l ulog.Logger = ulog.Null if debugEnabled { bootcmd = []string{"fbnetboot", "-v", "-userclass", "linuxboot"} l = ulog.Log } else { bootcmd = []string{"fbnetboot", "-userclass", "linuxboot"} } if nb.OverrideURL != nil { bootcmd =...
[ -0.653770923614502, 0.08417895436286926, 0.9069154858589172, 1.1183040142059326, 0.12729418277740479, -0.039403922855854034, -0.6503315567970276, -0.26990652084350586, 0.21288727223873138, -0.7525355815887451, 0.17588314414024353, -0.3288692533969879, -0.42397409677505493, 1.53823304176330...
func (nb *NetBooter) TypeName() string { return nb.Type }
[ -0.6369612812995911, 0.21444320678710938, 0.4585292637348175, 1.5913447141647339, 0.3137524127960205, 0.014096933417022228, 0.20520882308483124, -0.36396870017051697, -0.1078811064362526, 0.021837029606103897, -0.6135767102241516, -1.0555263757705688, -1.6583871841430664, 1.133883833885192...
func (m *StreamAccessLogsResponse) Validate() error { return m.validate(false) }
[ 1.0641998052597046, -0.6386157274246216, 0.13691040873527527, -0.49088314175605774, -0.02304849401116371, -0.42710408568382263, 0.733196496963501, -0.8944797515869141, 0.06626229733228683, 0.16845738887786865, 0.6981784105300903, 0.23007531464099884, -0.9466728568077087, 0.3670777976512909...
func (e StreamAccessLogsResponseValidationError) Field() string { return e.field }
[ 0.5892264246940613, -0.7433828115463257, 0.21326999366283417, -0.5040904879570007, -0.3308141529560089, 1.3576428890228271, 0.48787641525268555, -0.013539791107177734, 0.9358876943588257, -0.49796995520591736, 0.40884503722190857, 0.5548368692398071, 0.5432194471359253, -0.0625351369380950...
func (e StreamAccessLogsResponseValidationError) Reason() string { return e.reason }
[ 1.237317442893982, -0.7683425545692444, 0.11706811189651489, 0.08906247466802597, -0.3372558355331421, 0.903017520904541, 0.5887903571128845, 0.13909082114696503, 1.663618564605713, -0.4038584530353546, 0.8100417256355286, 1.475488543510437, 0.38779062032699585, 0.1537218540906906, 1.310...
func (e StreamAccessLogsResponseValidationError) Cause() error { return e.cause }
[ 1.072831630706787, -1.0563076734542847, 0.2782859206199646, -0.22084765136241913, -0.18706640601158142, 0.42812591791152954, 0.59490567445755, 0.354562371969223, 0.8185516595840454, -0.5348503589630127, 1.0492985248565674, 0.9800559878349304, -0.011195286177098751, 0.15010583400726318, 0...
func (e StreamAccessLogsResponseValidationError) Key() bool { return e.key }
[ -0.05051001161336899, -0.575883150100708, 0.2018463909626007, 0.08354421705007553, -0.4237661361694336, 1.103291392326355, 0.23962004482746124, -0.09092304110527039, 0.42134588956832886, 0.42287513613700867, 0.20762857794761658, 0.5453316569328308, -0.718726634979248, 0.049007125198841095,...
func (m *StreamAccessLogsMessage) Validate() error { return m.validate(false) }
[ 0.8960859775543213, 0.06774415075778961, 0.3321419954299927, -0.45730701088905334, 0.38511767983436584, -0.168198361992836, 0.32387983798980713, -1.0019515752792358, -0.5828348398208618, -0.4270551800727844, 1.2183074951171875, 1.3349075317382812, -1.166357159614563, 1.0440829992294312, ...
func (e StreamAccessLogsMessageValidationError) Field() string { return e.field }
[ 0.5012545585632324, -0.5517992973327637, 0.28931760787963867, -0.3737761676311493, -0.23367469012737274, 1.3595937490463257, 0.27353060245513916, 0.01647465117275715, 0.48486626148223877, -0.1811329424381256, 0.5209763050079346, 0.8606540560722351, 0.17059093713760376, 0.3104289174079895, ...
func (e StreamAccessLogsMessageValidationError) Reason() string { return e.reason }
[ 1.2500981092453003, -0.5108617544174194, 0.09853862226009369, 0.22515559196472168, -0.24692174792289734, 0.9158907532691956, 0.45339927077293396, 0.1784466654062271, 1.2753890752792358, -0.08330359309911728, 1.0451772212982178, 1.8450498580932617, 0.0670749843120575, 0.45451778173446655, ...
func (e StreamAccessLogsMessageValidationError) Cause() error { return e.cause }
[ 0.963820219039917, -0.8193840384483337, 0.32538101077079773, -0.17203208804130554, -0.14082203805446625, 0.5288284420967102, 0.43145909905433655, 0.2956448197364807, 0.288164347410202, -0.21514883637428284, 1.2005165815353394, 1.4078470468521118, -0.4271262288093567, 0.6935572028160095, ...
func (e StreamAccessLogsMessageValidationError) Key() bool { return e.key }
[ -0.09830612689256668, -0.3128052055835724, 0.26427820324897766, 0.1285697966814041, -0.2586129307746887, 1.1942601203918457, 0.05023391544818878, -0.11733041703701019, -0.07899846881628036, 0.6550526022911072, 0.21254970133304596, 0.8842461705207825, -1.043623924255371, 0.4276620149612427,...
func (m *StreamAccessLogsMessage_Identifier) Validate() error { return m.validate(false) }
[ 0.7491418719291687, -0.2844539284706116, 0.1438053697347641, -0.6938469409942627, -0.28817543387413025, 0.4154413044452667, 0.7833406925201416, 0.1371842920780182, -0.10830511152744293, 0.11848179996013641, 0.6816534996032715, 0.6931986212730408, -0.8050926327705383, 1.110560655593872, 0...
func (e StreamAccessLogsMessage_IdentifierValidationError) Field() string { return e.field }
[ 0.07755135744810104, -0.33430299162864685, 0.15671053528785706, -0.2647255063056946, -0.3345550298690796, 1.4418586492538452, 0.23765526711940765, -0.0949929729104042, 0.5298627614974976, -0.04300720989704132, 0.17356595396995544, 0.652911901473999, -0.18552227318286896, 0.0387812033295631...
func (e StreamAccessLogsMessage_IdentifierValidationError) Reason() string { return e.reason }
[ 0.7446843981742859, -0.29366663098335266, 0.023204879835247993, 0.10158605873584747, -0.3748878240585327, 0.8031537532806396, 0.3456716239452362, 0.08008463680744171, 1.3002471923828125, 0.23480594158172607, 0.6038246750831604, 1.756373405456543, -0.2631598114967346, -0.00031302310526371, ...
func (e StreamAccessLogsMessage_IdentifierValidationError) Cause() error { return e.cause }
[ 0.5292412042617798, -0.49648940563201904, 0.19114422798156738, -0.19255223870277405, -0.3617665767669678, 0.4270976185798645, 0.46631062030792236, 0.30034196376800537, 0.27600955963134766, 0.06650751829147339, 0.8583192229270935, 1.3268482685089111, -0.776063084602356, 0.1769949197769165, ...
func (e StreamAccessLogsMessage_IdentifierValidationError) Key() bool { return e.key }
[ -0.459076851606369, -0.12378178536891937, 0.12738603353500366, 0.18481199443340302, -0.3580600619316101, 1.2286007404327393, 0.1583026647567749, -0.025510046631097794, -0.0011821480002254248, 0.8804142475128174, 0.00414084130898118, 0.7440794706344604, -1.3770135641098022, 0.07927692681550...
func (m *StreamAccessLogsMessage_HTTPAccessLogEntries) Validate() error { return m.validate(false) }
[ 1.3629498481750488, 0.585368812084198, 0.3580450415611267, -0.18594081699848175, -0.1681843101978302, 0.03380246087908745, 0.5132251977920532, -0.38371744751930237, -0.5767629742622375, 0.5303370356559753, 1.0593185424804688, 1.4473453760147095, -0.9485965371131897, 1.3192890882492065, -...
func (e StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError) Field() string { return e.field }
[ 1.012265682220459, -0.035471461713314056, 0.30119216442108154, -0.3327867388725281, -0.10590438544750214, 1.2617970705032349, 0.3671937584877014, -0.021783199161291122, 0.33909672498703003, 0.21751420199871063, 0.6589047312736511, 1.0490235090255737, 0.27495646476745605, 0.5366255640983582...
func (e StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError) Reason() string { return e.reason }
[ 1.6600592136383057, -0.08565723896026611, 0.07980218529701233, 0.2275230437517166, -0.1810217946767807, 0.819287121295929, 0.5320815443992615, 0.13138574361801147, 1.1142550706863403, 0.1926584243774414, 1.0489462614059448, 2.05792498588562, 0.05232328549027443, 0.6458035707473755, 0.753...
func (e StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError) Cause() error { return e.cause }
[ 1.4471231698989868, -0.19166584312915802, 0.2646360695362091, -0.005844514816999435, -0.0031228933949023485, 0.44938215613365173, 0.4889518618583679, 0.4456675946712494, 0.125308558344841, 0.20688024163246155, 1.263096570968628, 1.559651255607605, -0.3762098550796509, 0.832839846611023, ...
func (e StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError) Key() bool { return e.key }
[ 0.42305347323417664, -0.008696538396179676, 0.1662238985300064, 0.11729746311903, -0.19083116948604584, 1.2133235931396484, 0.2286607176065445, -0.036911968141794205, -0.1690264493227005, 1.008380651473999, 0.4821953773498535, 1.0636556148529053, -0.9834537506103516, 0.6360656023025513, ...
func (m *StreamAccessLogsMessage_TCPAccessLogEntries) Validate() error { return m.validate(false) }
[ 1.492859125137329, 0.9159550070762634, 0.18312421441078186, -0.4708811342716217, -0.060327623039484024, 0.2086220532655716, 0.31146273016929626, -0.13966168463230133, -0.7810158133506775, 0.9415002465248108, 1.243441104888916, 0.15480449795722961, -0.7979423999786377, 1.1249827146530151, ...
func (e StreamAccessLogsMessage_TCPAccessLogEntriesValidationError) Field() string { return e.field }
[ 1.125212550163269, 0.24928085505962372, 0.21621443331241608, -0.5349929332733154, -0.03825376555323601, 1.3615577220916748, 0.21571791172027588, 0.19112125039100647, 0.26972073316574097, 0.3432769179344177, 0.7000964283943176, 0.46832919120788574, 0.1458611935377121, 0.4375200867652893, ...
func (e StreamAccessLogsMessage_TCPAccessLogEntriesValidationError) Reason() string { return e.reason }
[ 1.7587229013442993, 0.19864802062511444, -0.04246078059077263, 0.08015168458223343, -0.14662712812423706, 0.9126198887825012, 0.42474088072776794, 0.3146268129348755, 1.0367579460144043, 0.24402934312820435, 1.0989460945129395, 1.4533957242965698, -0.06375513970851898, 0.5016823410987854, ...
func (e StreamAccessLogsMessage_TCPAccessLogEntriesValidationError) Cause() error { return e.cause }
[ 1.5174739360809326, 0.1115497350692749, 0.16224822402000427, -0.16005253791809082, -0.041937801986932755, 0.6082342863082886, 0.3868899643421173, 0.5695079565048218, 0.015364691615104675, 0.2517436742782593, 1.2826160192489624, 0.9127883315086365, -0.4883461594581604, 0.7456201314926147, ...
func (e StreamAccessLogsMessage_TCPAccessLogEntriesValidationError) Key() bool { return e.key }
[ 0.4769178032875061, 0.33487582206726074, 0.12595541775226593, -0.03715091943740845, -0.16031523048877716, 1.2213295698165894, 0.10980100184679031, 0.16076934337615967, -0.24477031826972961, 1.0758730173110962, 0.5482060313224792, 0.5841256380081177, -1.1428784132003784, 0.5613015294075012,...
func TestDeltaCreate(t *testing.T) { var ( base = "busybox:1.24" target = "busybox:1.29" delta = "busybox:delta-1.24-1.29" ) var ( err error rc io.ReadCloser ctx = context.Background() client = testEnv.APIClient() ) pullBaseAndTargetImages(t, client, base, target) rc, err = client.Im...
[ -0.018487829715013504, -0.37995222210884094, 0.7479217648506165, -0.2412731945514679, 1.2278610467910767, 1.1584752798080444, 0.3966158926486969, -0.2787579596042633, 0.23571434617042542, -0.8830519318580627, -0.2594314515590668, 0.0654192790389061, 0.06530503183603287, -0.2690249383449554...
func TestDeltaCreateDestinationLock(t *testing.T) { var ( base = "debian:8" target = "debian:10" delta = "debian:delta" ) var ( err error rc io.ReadCloser ctx = context.Background() client = testEnv.APIClient() ) pullBaseAndTargetImages(t, client, base, target) rc, err = client.Image...
[ -0.07449106127023697, 0.05588456615805626, 0.9250446557998657, -0.06904768198728561, 1.085577130317688, 0.30433422327041626, 0.6079174876213074, -0.20734547078609467, -0.24801835417747498, -0.7195459604263306, 0.05129973217844963, 0.14568555355072021, 0.36135998368263245, 0.150750532746315...
func TestDeltaSize(t *testing.T) { type recordedSize struct { desc string wantMin int64 wantMax int64 got int64 } allSizes := []recordedSize{} client := testEnv.APIClient() ctx := context.Background() for _, tc := range deltaTestCases { delta := deltaName(tc.base, tc.target) t.Run(delta, fun...
[ 0.02820359542965889, 0.3589101731777191, 1.0193547010421753, -0.422579824924469, 0.3174462616443634, 0.8504173755645752, 0.6642493605613708, -0.10764647275209427, 0.3419591188430786, -0.3970842659473419, -0.1836276352405548, 0.3233358561992645, -0.1943572461605072, 0.8152490258216858, 0....
func TestDeltaCorrectness(t *testing.T) { defer setupTemporaryTestRegistry(t)() client := testEnv.APIClient() ctx := context.Background() for _, tc := range deltaTestCases { delta := deltaName(tc.base, tc.target) t.Run(delta, func(t *testing.T) { imagesToBuild := []string{tc.base, tc.target} if tc.image...
[ 0.07645533233880997, -0.5752516984939575, 0.8395988941192627, -0.22657684981822968, 0.8412299156188965, 0.9090784788131714, 1.0086973905563354, 0.7029384970664978, 0.2848736643791199, -0.1396167129278183, 0.20843523740768433, 0.1698726862668991, 0.0417889840900898, 0.6588743329048157, 0....
func TestPullUsingDeltaStore(t *testing.T) { // Basis and target for delta. const basis = "busybox:1.34" const target = "busybox:1.35" delta := deltaName(basis, target) // We'll push the delta to this registry. defer setupTemporaryTestRegistry(t)() // Create a delta, push it to the temporary test registry. fu...
[ -0.29772669076919556, 0.5948361158370972, 0.665327787399292, -0.6105079054832458, 0.4474395215511322, 0.6256147027015686, 0.5093816518783569, 0.1310824602842331, 0.9602146148681641, -0.5167716145515442, -0.14079800248146057, 0.654303789138794, 0.5024759769439697, 0.41965579986572266, 0.2...
func ttrBuildImageAsserting(ctx context.Context, t *testing.T, client apiclient.APIClient, image string) func() { source := fakecontext.New(t, "") defer source.Close() err := copy.DirCopy("../../integration/testdata/delta/", source.Dir, copy.Content, false) assert.Assert(t, err) resp, err := client.ImageBuild(ct...
[ -0.6977447867393494, -0.6419919729232788, 0.6202665567398071, -0.8498515486717224, -0.10298942029476166, 0.8311499357223511, 0.6387820839881897, 0.06618022918701172, 0.11852094531059265, 0.10568209737539291, 0.37531808018684387, -0.015128593891859055, -0.05315018817782402, 0.35539564490318...
func ttrRemoveImageAsserting(ctx context.Context, t *testing.T, client apiclient.APIClient, image string) { resp, err := client.ImageRemove(ctx, ttrImageName(image), types.ImageRemoveOptions{}) assert.Assert(t, err) assert.Assert(t, len(resp) > 0) }
[ -1.2436752319335938, 0.12445691227912903, 0.25105831027030945, -1.2163701057434082, 0.3521636426448822, 0.1405729353427887, 0.10450010001659393, 0.4763556718826294, 0.20124158263206482, 0.4323846399784088, 0.5553248524665833, -0.6126983165740967, -0.9532049894332886, 0.4128260314464569, ...
func ttrCreateDeltaAsserting(ctx context.Context, t *testing.T, client apiclient.APIClient, base, target string) func() { delta := deltaName(base, target) rc, err := client.ImageDelta(ctx, ttrImageName(base), ttrImageName(target), types.ImageDeltaOptions{Tag: ttrImageName(delta)}) assert.Assert(t, err) if rc ...
[ -0.6948015093803406, -0.8136888146400452, 0.7271139621734619, -1.1684577465057373, 0.1080416589975357, 0.8121705055236816, 0.14049285650253296, -0.3817768394947052, -0.2328263372182846, 0.025341371074318886, 0.4208228588104248, -0.3457232117652893, 0.23067662119865417, 0.06316451728343964,...
func ttrPushImageAsserting(ctx context.Context, t *testing.T, client apiclient.APIClient, image string) { rc, err := client.ImagePush(ctx, ttrImageName(image), types.ImagePushOptions{RegistryAuth: "{}"}) assert.Assert(t, err) if rc != nil { body, err := readAllAndClose(rc) assert.Assert(t, err) assert.Assert(t...
[ -1.123736023902893, 0.040320780128240585, 0.5473317503929138, -0.9639077186584473, 0.26479312777519226, 1.0510064363479614, -0.21132607758045197, -0.043057095259428024, 0.11587540060281754, 1.279218077659607, 0.8982411026954651, -0.21409878134727478, -0.28239360451698303, 0.670007288455963...
func ttrPullImage(ctx context.Context, client apiclient.APIClient, image string) error { rc, err := client.ImagePull(ctx, ttrImageName(image), types.ImagePullOptions{RegistryAuth: "{}"}) if err != nil { return err } if rc != nil { body, err := readAllAndClose(rc) if err != nil { return err } if !string...
[ -0.705032229423523, -0.2098250687122345, 0.6303760409355164, -1.0959786176681519, -0.2558915615081787, 0.3324824273586273, -1.1363896131515503, -0.29285404086112976, 0.16507788002490997, 1.4256540536880493, 0.4877183735370636, -0.4104321599006653, 0.1080043688416481, 0.6311823129653931, ...
func ttrPullImageAsserting(ctx context.Context, t *testing.T, client apiclient.APIClient, image string) { err := ttrPullImage(ctx, client, image) assert.NilError(t, err) }
[ -0.47991013526916504, 0.011606015264987946, 0.22596526145935059, -1.3430702686309814, -0.1110997349023819, 0.566361129283905, -0.19651567935943604, 0.18268272280693054, 0.4273647665977478, 0.7623910903930664, 0.7415057420730591, 0.10173045098781586, -0.5890251994132996, 0.6111215949058533,...
func ttrQueryDeltaSizeAsserting(ctx context.Context, t *testing.T, client apiclient.APIClient, image string) int64 { tarRC, err := client.ImageSave(ctx, []string{ttrImageName(image)}) assert.Assert(t, err) defer tarRC.Close() size := deltaSizeFromTar(t, tarRC) return size }
[ -0.559312105178833, -0.3172624707221985, 0.4404963552951813, -1.560508131980896, -0.6027479767799377, 0.6349756121635437, 0.34763389825820923, -0.18564194440841675, 0.41248148679733276, 0.47534510493278503, 0.6236780285835266, -0.16714851558208466, -0.6492498517036438, 0.6883151531219482, ...
func ttrImageName(image string) string { return registry.DefaultURL + "/" + image }
[ -0.9755235314369202, 0.07298950850963593, 0.24502478539943695, -0.8109142780303955, -0.48122650384902954, -0.30270877480506897, -0.7867020964622498, 0.7632603049278259, -0.3286413848400116, 1.5040627717971802, 0.13903726637363434, -0.7018762826919556, 0.6664837598800659, 0.7469714283943176...
func ttrHashImageAsserting(ctx context.Context, t *testing.T, client apiclient.APIClient, image string) []byte { ii, _, err := client.ImageInspectWithRaw(ctx, ttrImageName(image)) assert.Assert(t, err) // We don't hash the image content per se, but the hashes of individual // layers, which are themselves based on ...
[ -0.06245412304997444, -0.4769769310951233, 0.4529649615287781, -1.0631680488586426, -0.12093023955821991, -0.26264041662216187, 0.007930107414722443, -0.25519558787345886, -0.3720738887786865, 0.2406478226184845, 0.2057196944952011, -0.532245397567749, -0.1769925057888031, 0.75280946493148...
func deltaName(base, target string) string { cleanBase := strings.ReplaceAll(base, ":", "_") cleanTarget := strings.ReplaceAll(target, ":", "_") return "delta-" + cleanBase + "-" + cleanTarget }
[ -0.12877972424030304, -1.322227120399475, 0.9480029940605164, -1.0246292352676392, -0.6280189752578735, 0.6558138728141785, -1.478360652923584, 0.5161643028259277, -0.36489370465278625, 0.7293656468391418, 0.14184674620628357, 0.7282342314720154, 0.6860768795013428, -0.9758267402648926, ...
func readAllAndClose(rc io.ReadCloser) (string, error) { data, err := io.ReadAll(rc) if err != nil { return "", err } rc.Close() return string(data), nil }
[ 0.27789756655693054, -1.2464444637298584, 0.8706402778625488, -0.24482643604278564, -1.4911096096038818, 0.3971930146217346, -0.9114824533462524, -0.43505072593688965, 0.017726736143231392, 0.23842112720012665, 1.0405993461608887, -0.15479473769664764, -0.26836109161376953, 0.8309273719787...
func sliceContains(haystack []string, needle string) bool { for _, e := range haystack { if e == needle { return true } } return false }
[ 0.3133753538131714, -0.5912906527519226, 0.32782337069511414, 0.1566423922777176, 0.3350248336791992, -0.528610348701477, -0.8038507103919983, 0.000948672997765243, -0.32981929183006287, 0.9642202258110046, 0.14077505469322205, 0.4677697718143463, 0.3538559377193451, -0.16477631032466888, ...
func (e *PythonOp) waitOnRequest(requestID int, x interface{}) error { for e.pendingRequests[requestID] == nil && e.err == nil { e.cond.Wait() } if e.err != nil { return e.err } if x != nil { err := json.Unmarshal([]byte(*e.pendingRequests[requestID]), x) if err != nil { return err } } return nil }
[ -1.1680653095245361, -0.3592089116573334, 0.5200845003128052, -0.4408828616142273, -0.43030014634132385, 0.4901691973209381, -1.0251283645629883, -0.36041006445884705, 0.04556199908256531, -0.04524105414748192, 0.3757089376449585, -0.49599897861480713, -0.006744726095348597, 0.613923609256...
func (e *PythonOp) makePacket(name string, x interface{}) Packet { packet := Packet{ RequestID: e.nextRequestID, Name: name, JSON: string(skyhook.JsonMarshal(x)), } e.nextRequestID++ return packet }
[ -1.3044698238372803, 0.8736835718154907, 0.454467236995697, -0.5729836225509644, -0.964737594127655, 0.2600986659526825, -1.3907036781311035, -0.8640740513801575, 0.9048379063606262, -0.3110722601413727, -0.30022138357162476, 0.27262619137763977, 0.2635691165924072, -0.6915291547775269, ...
func (e *PythonOp) request(name string, req interface{}, resp interface{}) error { e.mu.Lock() defer e.mu.Unlock() packet := e.makePacket(name, req) // We ignore the error here since it's generally not a useful message. // If writing fails, it means readLoop probably has terminated and that will // eventually po...
[ -1.384082555770874, -0.1375451534986496, 0.5792378187179565, 0.10535362362861633, 0.6032358407974243, 0.13473506271839142, -0.6832020282745361, -0.4219481348991394, 0.5258986353874207, -0.23999980092048645, 0.23528741300106049, 0.0453975647687912, 0.26315099000930786, -0.2666623890399933, ...
func (e *PythonOp) closeCmd() { e.stdout.Close() e.stdin.Close() if e.cmd != nil { err := e.cmd.Wait() e.cmd = nil if err != nil && e.err == nil { e.err = err } } }
[ -0.049348507076501846, -0.9109025597572327, 0.8302176594734192, 0.20318621397018433, -0.08530449867248535, 0.8147447109222412, 0.4838528335094452, -0.652305006980896, 0.24929389357566833, -1.0255993604660034, 1.2686493396759033, -0.43421733379364014, 0.37778517603874207, 1.3984111547470093...
func CreateClientset(kubeconfig string) (*kubernetes.Clientset, error) { config, err := clientcmd.BuildConfigFromFlags("", kubeconfig) if err != nil { return nil, fmt.Errorf("failed to create config object from kube-config file: %q (error: %v)", kubeconfig, err) } clientset, err := kubernetes.NewForConfig(con...
[ 0.7534922957420349, -1.026002049446106, 0.30804839730262756, -0.7182031273841858, -0.26329484581947327, 0.13749435544013977, -0.17810209095478058, -1.3212183713912964, -0.7225610613822937, 0.3636760711669922, 0.3107856810092926, 0.268354207277298, -0.8891580700874329, 0.4895153045654297, ...
func createTestNamespace(clientset kubernetes.Interface, prefix string) (string, error) { template := &v1.Namespace{ ObjectMeta: metav1.ObjectMeta{ GenerateName: prefix, }, } namespace, err := clientset.CoreV1().Namespaces().Create(template) if err != nil { return "", fmt.Errorf("failed to create a namespa...
[ 0.1679975390434265, -0.38708412647247314, 0.7133674621582031, -0.3882259130477905, -0.49582865834236145, -0.3680410087108612, 0.5598472952842712, -1.1502972841262817, 1.1585166454315186, 0.35261815786361694, 0.035029396414756775, 0.07546427845954895, -0.4055121839046478, 0.4675702452659607...
func deleteTestNamespace(clientset kubernetes.Interface, namespace string) error { if err := clientset.CoreV1().Namespaces().Delete(namespace, &metav1.DeleteOptions{GracePeriodSeconds: &immediate}); err != nil { return fmt.Errorf("failed to delete namespace %q (error: %v)", namespace, err) } log.Infof("namespace %...
[ 0.7225655317306519, -0.23115642368793488, 0.25818976759910583, -0.44304272532463074, -0.20043565332889557, -0.035152554512023926, 0.5937761664390564, -1.335452675819397, 1.8629029989242554, -0.18858881294727325, 0.31581810116767883, 0.5734450221061707, -1.131990909576416, 0.590822160243988...
func createService(clientset kubernetes.Interface, namespace string, name string, port int32, serviceType v1.ServiceType, labels map[string]string, selector map[string]string, annotation map[string]string) (*v1.Service, error) { _, err := clientset.CoreV1().Services(namespace).Create(&v1.Service{ ObjectMeta: metav...
[ 0.04364820197224617, -0.6141899824142456, 0.32178324460983276, -0.356363445520401, 0.33438241481781006, 0.5070763826370239, -0.7393071055412292, -1.418713927268982, 0.045051831752061844, 0.5543931722640991, 0.6481496095657349, 0.5961554050445557, -0.8770771622657776, 0.061866868287324905, ...
func deleteService(clientset kubernetes.Interface, namespace string, name string) error { return clientset.CoreV1().Services(namespace).Delete(name, &metav1.DeleteOptions{GracePeriodSeconds: &immediate}) }
[ 0.04725224897265434, 0.17891472578048706, 0.38003942370414734, -0.1805349439382553, -0.20719128847122192, 0.057143714278936386, -0.2516609728336334, -1.3979626893997192, 0.46007004380226135, 0.3215825855731964, 0.5800883769989014, 0.8494799137115479, -0.6146940588951111, 1.0803941488265991...
func createPod(clientset kubernetes.Interface, namespace string, image string, name string, labels map[string]string, command []string, args []string) (*v1.Pod, error) { env := []v1.EnvVar{ { Name: "NAMESPACE", ValueFrom: &v1.EnvVarSource{ FieldRef: &v1.ObjectFieldSelector{ APIVersion: "v1", Fie...
[ -0.02310313656926155, -0.0689784437417984, 0.8446865081787109, -0.6012423634529114, 0.6683836579322815, 0.4706308841705322, -0.44387248158454895, -0.6275439858436584, -0.021207788959145546, 1.13017737865448, 1.0271817445755005, 0.41163185238838196, -0.23500217497348785, -0.4934562742710113...
func deletePod(clientset kubernetes.Interface, namespace string, name string) error { return clientset.CoreV1().Pods(namespace).Delete(name, &metav1.DeleteOptions{GracePeriodSeconds: &immediate}) }
[ 0.10023371130228043, 0.33850744366645813, 0.3139631748199463, -0.5258077383041382, -0.6702067852020264, 0.36348819732666016, 0.2636460065841675, -0.7859191298484802, 0.7785000205039978, 0.7259281277656555, 0.8025137782096863, 0.7183250784873962, -0.10153568536043167, 0.045761141926050186, ...
func createIstioCARole(clientset kubernetes.Interface, namespace string) error { role := rbac.Role{ TypeMeta: metav1.TypeMeta{ APIVersion: "rbac.authorization.k8s.io/v1beta1", }, ObjectMeta: metav1.ObjectMeta{ Name: "istio-ca-role", Namespace: namespace, }, Rules: []rbac.PolicyRule{ { Ve...
[ -0.10572056472301483, 0.1620596945285797, 0.7850261926651001, -0.31022968888282776, 0.8399302363395691, 0.6808843016624451, 0.03882226720452309, -1.3108867406845093, -0.28237393498420715, 0.6498225927352905, -0.358268141746521, 0.018705762922763824, -0.7067787647247314, -0.1990264356136322...
func createIstioCARoleBinding(clientset kubernetes.Interface, namespace string) error { rolebinding := rbac.RoleBinding{ TypeMeta: metav1.TypeMeta{ APIVersion: "rbac.authorization.k8s.io/v1beta1", }, ObjectMeta: metav1.ObjectMeta{ Name: "istio-ca-role-binding", Namespace: namespace, }, Subjects...
[ -0.08625859767198563, 0.12008492648601532, 0.6073124408721924, 0.15616083145141602, 0.44487008452415466, 0.49571365118026733, 0.12286323308944702, -0.6792568564414978, 0.09395544975996017, 0.3989860415458679, -0.4798750579357147, 0.45046332478523254, -0.42732977867126465, -0.06758993119001...
func WaitForSecretExist(clientset kubernetes.Interface, namespace string, secretName string, timeToWait time.Duration) (*v1.Secret, error) { watch, err := clientset.CoreV1().Secrets(namespace).Watch(metav1.ListOptions{}) if err != nil { return nil, fmt.Errorf("failed to set up watch for secret (error: %v)", err) ...
[ 0.7508959770202637, -0.9862414598464966, 0.6313275694847107, -0.48192349076271057, 0.43595877289772034, 0.04504455253481865, -0.7452712059020996, -1.3340706825256348, -0.5386867523193359, 0.7751926183700562, -0.4496237635612488, 0.4105933606624603, -0.6338445544242859, 0.7576497793197632, ...
func ExamineSecret(secret *v1.Secret) error { if secret.Type != controller.IstioSecretType { return fmt.Errorf(`unexpected value for the "type" annotation: expecting %v but got %v`, controller.IstioSecretType, secret.Type) } for _, key := range []string{controller.CertChainID, controller.RootCertID, controller...
[ 0.15201255679130554, 0.33511850237846375, 0.5924367308616638, 0.22247923910617828, 0.8014721274375916, -0.191145658493042, -0.18907400965690613, -0.8280683755874634, -0.05683598294854164, -0.42939677834510803, -0.3703218698501587, 0.2983609735965729, -0.22822046279907227, 0.914348006248474...
func DeleteSecret(clientset kubernetes.Interface, namespace string, name string) error { return clientset.CoreV1().Secrets(namespace).Delete(name, &metav1.DeleteOptions{GracePeriodSeconds: &immediate}) }
[ 0.5967421531677246, 0.21362051367759705, 0.3050941228866577, -0.36791375279426575, -0.4443392753601074, -0.09053536504507065, -0.42975062131881714, -1.4654407501220703, 0.0075078182853758335, 0.1871778815984726, -0.4019177258014679, 0.9218813180923462, -0.06179632991552353, 0.8392782211303...
func NewQuerier(conn genericConn) *DBQuerier { return &DBQuerier{ conn: conn, } }
[ -0.5256182551383972, -0.754611074924469, 0.13305482268333435, -0.01721671223640442, -0.310730516910553, -0.1884835958480835, -1.9715962409973145, 0.007814476266503334, -0.496764212846756, -1.2686281204223633, -0.42259681224823, 0.7023714780807495, -0.06099830940365791, 1.0114034414291382, ...
func (q *DBQuerier) WithTx(tx pgx.Tx) (*DBQuerier, error) { return &DBQuerier{conn: tx}, nil }
[ -0.2814294695854187, -0.03796384111046791, 0.23675383627414703, -0.802437961101532, -0.41651055216789246, 0.2917250394821167, -1.2893621921539307, -0.4021618068218231, -0.1189933568239212, -0.8972519040107727, -0.6204027533531189, -0.014832419343292713, 0.06281209737062454, 0.3639303147792...
func PrepareAllQueries(ctx context.Context, p preparer) error { if _, err := p.Prepare(ctx, backtickSQL, backtickSQL); err != nil { return fmt.Errorf("prepare query 'Backtick': %w", err) } if _, err := p.Prepare(ctx, backtickQuoteBacktickSQL, backtickQuoteBacktickSQL); err != nil { return fmt.Errorf("prepare que...
[ 0.5426748394966125, 0.020069669932127, 0.7286837100982666, 0.6379649639129639, -0.5009972453117371, 0.4145083725452423, -0.03994674235582352, -1.1192164421081543, 0.4829801023006439, -0.14975278079509735, -0.779039740562439, -0.35958248376846313, -0.07583926618099213, 1.4220212697982788, ...
func main() { urls := cnvd.IndexFromUrl(33, 20, 20) for _, i := range urls { Json := cnvd.DataFromIndexUrl(i) fmt.Println(Json) } }
[ -0.8229707479476929, 0.16939197480678558, 0.33005836606025696, 0.22112378478050232, -0.32031452655792236, -0.1538551300764084, 0.005443550646305084, 0.21572420001029968, -0.6387238502502441, -0.2670685946941376, -0.8802720904350281, 0.5859436392784119, 0.5417449474334717, -0.02847239375114...
func RedirectHTTP(w http.ResponseWriter, r *http.Request) { if r.TLS != nil || r.Host == "" { http.Error(w, "", http.StatusNotFound) } var u *url.URL u = r.URL host := r.Host u.Host = strings.Split(host, ":")[0] u.Scheme = "https" log.Printf("redirect to u.host %s -> %s\n", r.Host, u.String()) http.Redirec...
[ 0.03611631318926811, 0.3849128484725952, 0.5955957174301147, 0.02344430424273014, 0.06101643294095993, 1.8504215478897095, 0.6452108025550842, -0.2898397147655487, -0.450335830450058, 0.3221420347690582, 0.05255252122879028, 0.5765395760536194, 0.589446485042572, -0.5191389322280884, -0....