text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (r *IntervalFilterInput) MakeQueryString(command string, measurement string) string {
var b bytes.Buffer
b.WriteString(command)
b.WriteString(" FROM ")
b.WriteString(measurement)
check_empty := r == &IntervalFilterInput{}
if check_empty {
return b.String()
}
flag := true
b, flag = query.HandleTagField... | [
-0.11163834482431412,
-0.27138689160346985,
0.5561622977256775,
-0.22926700115203857,
-0.7435911297798157,
1.18959379196167,
-0.10318627208471298,
-1.0463074445724487,
-0.6677688360214233,
-0.26308855414390564,
0.6664149761199951,
-0.09777356684207916,
-0.2405196577310562,
-0.7095676660537... |
func init() {
Packages["encoding/base32"] = Package{
Binds: map[string]Value{
"HexEncoding": ValueOf(&base32.HexEncoding).Elem(),
"NewDecoder": ValueOf(base32.NewDecoder),
"NewEncoder": ValueOf(base32.NewEncoder),
"NewEncoding": ValueOf(base32.NewEncoding),
"NoPadding": ValueOf(base32.NoPadding),
"StdEnco... | [
-0.3490578830242157,
0.005081153940409422,
0.532099187374115,
-0.7080884575843811,
-0.45521387457847595,
0.6932753920555115,
-0.13858374953269958,
-0.7304595708847046,
0.11709745973348618,
-0.0811004713177681,
-0.756151020526886,
0.5788471102714539,
0.01778731867671013,
0.7766806483268738,... |
func (e *Encoder) Encode(db *Database) error {
db.cleanupBinaries()
// Unlock protected entries ensuring that we have them prepared in the order that is matching
// the xml unmarshalling order
err := db.UnlockProtectedEntries()
if err != nil {
return err
}
// Re-Lock the protected values mapping to ensure tha... | [
0.08309987932443619,
-0.022699451074004173,
0.6429883241653442,
0.9047460556030273,
-0.03321840241551399,
-0.2581273317337036,
0.031842514872550964,
0.11633193492889404,
-0.42298927903175354,
0.13419340550899506,
0.09794490784406662,
-0.8785780072212219,
-0.3016769587993622,
0.598687887191... |
func FourOhFour(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotFound)
w.Write([]byte("404 - Not Found"))
} | [
-0.3582536280155182,
-0.8973934054374695,
0.41571345925331116,
-0.46438026428222656,
0.6626405119895935,
0.004282152745872736,
0.6533064246177673,
-0.3919001817703247,
-0.6982765793800354,
-0.06929385662078857,
-0.37897369265556335,
-0.32389548420906067,
-0.07199089974164963,
0.11650264263... |
func FiveHundred(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusInternalServerError)
w.Write([]byte("500 - Internal Server Error"))
} | [
-0.6613054275512695,
-0.44981348514556885,
0.45349833369255066,
-0.6872444748878479,
0.04810479283332825,
0.37587615847587585,
0.4438377916812897,
-0.5373488664627075,
0.042205531150102615,
-0.1144285500049591,
-0.32556068897247314,
0.6247776746749878,
-0.6130231618881226,
1.54592084884643... |
func (a *Actions) clear() {
a.Send = nil
a.Hash = nil
a.WriteAhead = nil
a.Commits = nil
a.StateTransfer = nil
} | [
-0.24304930865764618,
0.10746760666370392,
0.24642634391784668,
0.02946588024497032,
0.4319073557853699,
0.3232411742210388,
0.2724353075027466,
-1.0446388721466064,
0.37636005878448486,
0.3087596297264099,
0.3066473603248596,
1.0293105840682983,
0.35257792472839355,
0.6368104219436646,
... |
func (a *Actions) concat(o *Actions) *Actions {
a.Send = append(a.Send, o.Send...)
a.Commits = append(a.Commits, o.Commits...)
a.Hash = append(a.Hash, o.Hash...)
a.WriteAhead = append(a.WriteAhead, o.WriteAhead...)
if o.StateTransfer != nil {
if a.StateTransfer != nil {
panic("attempted to concatenate two con... | [
0.07334215193986893,
0.09525016695261002,
0.6022388339042664,
0.06776845455169678,
-0.19035646319389343,
-0.3995009660720825,
-0.3269651532173157,
-1.3208662271499634,
0.48532816767692566,
0.13225147128105164,
0.94256591796875,
0.2919310927391052,
0.517438530921936,
0.45126575231552124,
... |
func (ca *ClientActions) clear() {
ca.AllocatedRequests = nil
ca.StoreRequests = nil
ca.ForwardRequests = nil
} | [
0.5498755574226379,
-0.2961042821407318,
0.15230941772460938,
0.05298146232962608,
-0.08548937737941742,
0.678817093372345,
0.7436071634292603,
-1.4133838415145874,
0.8980668187141418,
-0.4509960114955902,
1.0947355031967163,
0.7002193331718445,
0.9709181785583496,
0.5707749724388123,
0.... |
func (ca *ClientActions) concat(o *ClientActions) *ClientActions {
ca.AllocatedRequests = append(ca.AllocatedRequests, o.AllocatedRequests...)
ca.StoreRequests = append(ca.StoreRequests, o.StoreRequests...)
ca.ForwardRequests = append(ca.ForwardRequests, o.ForwardRequests...)
return ca
} | [
0.6476251482963562,
-0.48382267355918884,
0.5611733198165894,
0.25065726041793823,
-0.482745885848999,
0.04230726882815361,
0.19573132693767548,
-1.3062777519226074,
0.9686607122421265,
-0.3376750648021698,
1.1148619651794434,
0.1130627915263176,
0.9004423022270203,
0.3961126208305359,
-... |
func AsLeakyDataStore(ds DataStore) (*LeakyDataStore, bool) {
lds, ok := ds.(*LeakyDataStore)
return lds, ok
} | [
-1.1438088417053223,
0.1607479453086853,
0.3732084631919861,
-1.4947785139083862,
-1.174872875213623,
-0.4289030134677887,
-1.029279112815857,
-0.02566712163388729,
1.3705401420593262,
0.12547972798347473,
-0.8765478134155273,
0.10594654083251953,
0.6615778803825378,
0.7817717790603638,
... |
func (lds *LeakyDataStore) SetFirstTimeViewCustomPartialError(val bool) {
lds.config.FirstTimeViewCustomPartialError = val
} | [
0.3803369402885437,
-0.1898309290409088,
-0.03333980217576027,
-0.7884027361869812,
-0.7952796220779419,
0.31788739562034607,
0.4298425018787384,
0.3277415931224823,
0.40356022119522095,
-0.6162232756614685,
0.43967655301094055,
0.12882877886295319,
0.08814093470573425,
1.013552188873291,
... |
func NewTemplate(senderID string, template *models.Template) *models.SendMessage {
recipient := &models.Recipient{ID: senderID}
sm := &models.SendMessage{}
sm.Recipient = recipient
a := &models.TemplateAttachment{
Type: "template",
Template: template,
}
m := &models.SendingMessage{Attachment: a}
sm.Messa... | [
-0.09120899438858032,
-0.05420302972197533,
0.6690512299537659,
-0.37435489892959595,
-1.2097723484039307,
-0.1318070888519287,
-0.7067884802818298,
-0.6342803835868835,
-0.11658976227045059,
0.5948835015296936,
-0.44639259576797485,
0.09789658337831497,
-0.6157528758049011,
0.294549047946... |
func CDNFilePush(cfID int) (content []byte, err error) {
var push CDNPush
db := config.GetDB()
sql := "SELECT a.`cdn_id`, a.`domain`, a.`path`, b.`file_name`, b.`file_size`," +
" c.`name`, c.`secret_id`, c.`secret_key`, c.`api_url`, c.`action`" +
"FROM (t_project a INNER JOIN t_cdn_file b ON a.`id` = b.`project_... | [
0.24153903126716614,
0.41170093417167664,
0.9904857277870178,
-0.21376127004623413,
-0.31042778491973877,
0.33313390612602234,
0.0446365661919117,
-1.0611852407455444,
-0.6666008830070496,
0.451913446187973,
-0.9403863549232483,
0.1426212340593338,
-0.2731596529483795,
0.32323482632637024,... |
func CDN77Push(push *CDNPush) (content []byte, err error) {
params := make(url.Values)
params["cdn_id"] = []string{strconv.Itoa(push.CDNID)}
params["login"] = []string{push.SecretID}
params["passwd"] = []string{push.SecretKey}
params["url[]"] = []string{"/" + push.Path + "/" + push.FileName}
res, err := http.Pos... | [
-0.08453608304262161,
0.09969758987426758,
1.02669358253479,
-0.3118021786212921,
-0.3976276218891144,
0.2586844861507416,
-0.6252056360244751,
-0.18000368773937225,
-0.3099932074546814,
0.7842832803726196,
-0.4779931902885437,
0.8218419551849365,
0.3013405203819275,
0.5824754238128662,
... |
func QcloudPush(push *CDNPush) (content []byte, err error) {
var RequestURL = push.APIURL
var SecretKey = push.SecretKey
var Method = "POST"
params := make(map[string]interface{})
params["SecretId"] = push.SecretID
params["Action"] = push.Action
if !strings.HasPrefix(push.Domain, "http://") {
push.Domain = "h... | [
-0.049201156944036484,
0.19820204377174377,
1.0906941890716553,
-0.4986758232116699,
-0.028225576505064964,
0.01827467978000641,
-0.289641797542572,
-0.633019208908081,
-0.3603217899799347,
0.2960377633571625,
-0.8526774048805237,
0.3494578003883362,
-0.2714797854423523,
0.3373767435550689... |
func Open(conf Config) (mq *MQ, err error) {
mqCollect.Lock()
defer mqCollect.Unlock()
conf.init()
if _, ok := mqCollect.mqMap[conf.addr]; ! ok {
mq, err := newMQ(conf)
if err != nil {
return nil, err
}
mqCollect.mqMap[conf.addr] = mq
}
return mqCollect.mqMap[conf.addr], nil
} | [
-0.36585181951522827,
-1.049631118774414,
0.49959227442741394,
-0.4887903332710266,
-1.0085111856460571,
0.3002564609050751,
0.1645507961511612,
0.6552773714065552,
0.4393273890018463,
0.29469966888427734,
-0.09729797393083572,
-0.09053885191679001,
-0.4660484492778778,
0.42627987265586853... |
func (mq *MQ) DeclareExchange(exchange ...*Exchange) error {
mqCollect.exchangeMu.Lock()
defer mqCollect.exchangeMu.Unlock()
activeCh, err := mq.pool.get()
defer mq.pool.release(activeCh)
if err != nil {
return err
}
if len(exchange) > 0 {
for i := range exchange {
if _, ok := mqCollect.exchangeMap[exchan... | [
-0.23356370627880096,
-0.6533787846565247,
0.7731043696403503,
0.2622646987438202,
0.7592418193817139,
0.786776602268219,
-0.3318999111652374,
0.18599064648151398,
-0.12042553722858429,
0.25867167115211487,
0.37835782766342163,
-0.6477914452552795,
-0.7003589868545532,
1.1571414470672607,
... |
func (mq *MQ) PoolLen() (chNum int, connNum int) {
return mq.pool.len()
} | [
-0.6391366124153137,
-0.6026527285575867,
0.27295616269111633,
-0.6350312829017639,
-0.18339987099170685,
0.6064322590827942,
0.9999008178710938,
0.507953405380249,
0.1362006813287735,
-0.15732558071613312,
-1.2362807989120483,
0.6792132258415222,
0.39847055077552795,
0.5098576545715332,
... |
func (item *baseItem) Path() *proto.Path {
return &item.path
} | [
0.21326081454753876,
-0.9008100628852844,
0.07703538984060287,
1.1936691999435425,
0.022994259372353554,
1.3829911947250366,
0.9533976316452026,
-1.0190006494522095,
-0.004197188187390566,
-0.41302794218063354,
-0.2526567876338959,
-0.010184523649513721,
-1.1185280084609985,
-0.31967601180... |
func itemFactory(path proto.Path, v interface{}) (validationItem, error) {
// We need to special case for no-type fields in yaml (e.g. empty item in list)
if v == nil {
return nil, InvalidObjectTypeError{Type: "nil", Path: path.String()}
}
kind := reflect.TypeOf(v).Kind()
switch kind {
case reflect.Bool:
retu... | [
-0.051327258348464966,
-0.8146712779998779,
0.6536548733711243,
-0.12460529059171677,
-0.3865463137626648,
-0.11555749922990799,
0.016056174412369728,
-0.40971988439559937,
-0.10256403684616089,
-0.41290387511253357,
-0.27634677290916443,
0.7207669615745544,
-0.08632975816726685,
-0.089982... |
func Get(variable string) string {
var config = map[string]Options{
"EnvAPIPort": {
Default: DefaultAPIPort,
Environment: EnvAPIPort,
},
"EnvAPIIP": {
Default: DefaultAPIIP,
Environment: EnvAPIIP,
},
"EnvBasicAuth": {
Default: strconv.FormatBool(DefaultBasicAuthentication),
Env... | [
-0.9648311734199524,
-0.7090989351272583,
0.7228984236717224,
-0.5805991291999817,
0.5583100318908691,
-0.1773134171962738,
-0.7856414318084717,
-0.26090508699417114,
-1.002699375152588,
1.2446366548538208,
-0.19746190309524536,
0.14049358665943146,
-0.45049670338630676,
0.3846799433231354... |
func InitKVStorage() *kv.LibKVBackend {
switch storagebackend := Get("EnvDefaultKVBackend"); storagebackend {
case structs.StorageBoltDB:
return generateDefaultStorageBackend()
case structs.StorageConsul:
consul.Register()
db := Get("EnvDefaultConsulAddr")
kv, err := kv.NewLibKVBackend(structs.StorageConsul... | [
0.5136173963546753,
-0.18404188752174377,
0.47703802585601807,
0.8540179133415222,
0.4277649521827698,
-0.33325886726379395,
-0.9829807281494141,
-0.32299304008483887,
-0.5346056222915649,
0.6132631897926331,
0.4164569079875946,
-0.7845547795295715,
-0.5767541527748108,
0.43066710233688354... |
func NewWriterBuffer(size int) ByteBuffer {
return newWriterByteBuffer(size)
} | [
-0.0933699756860733,
-0.18314120173454285,
0.38236746191978455,
-0.08659448474645615,
-0.7296703457832336,
-0.9831449389457703,
0.5760874152183533,
-0.047075338661670685,
0.4822019040584564,
-0.8642617464065552,
-1.1997604370117188,
0.1593693196773529,
-0.3951617479324341,
0.60892295837402... |
func NewReaderBuffer(buf []byte) ByteBuffer {
return newReaderByteBuffer(buf)
} | [
0.018850544467568398,
-0.8942210674285889,
0.15473198890686035,
0.22750264406204224,
-0.5482595562934875,
-0.007140247616916895,
-0.4684552550315857,
0.06394916772842407,
0.4192883372306824,
-0.5562536716461182,
-0.5098426938056946,
0.06876427680253983,
-0.4978586435317993,
0.4949294924736... |
func NewReaderWriterBuffer(size int) ByteBuffer {
return newReaderWriterByteBuffer(size)
} | [
-0.30419427156448364,
-0.4892628788948059,
0.3740554749965668,
0.06279812008142471,
-0.5784039497375488,
-0.921954870223999,
-0.24439114332199097,
0.307893306016922,
0.06064407527446747,
-0.734745442867279,
-0.23595070838928223,
-0.7558169960975647,
-0.5627856254577637,
0.14473465085029602... |
func (b *defaultByteBuffer) Next(n int) (buf []byte, err error) {
if b.status&BitReadable == 0 {
return nil, errors.New("unreadable buffer, cannot support Next")
}
buf, err = b.Peek(n)
b.readIdx += n
return buf, err
} | [
-0.7424281239509583,
0.7826492190361023,
0.4894610047340393,
1.210555911064148,
-0.5940218567848206,
0.37060117721557617,
-0.3551514148712158,
-0.8157555460929871,
0.4885486364364624,
-0.39940011501312256,
-0.6012444496154785,
0.1923530399799347,
-0.7631975412368774,
0.2920101284980774,
... |
func (b *defaultByteBuffer) Peek(n int) (buf []byte, err error) {
if b.status&BitReadable == 0 {
return nil, errors.New("unreadable buffer, cannot support Peek")
}
if err = b.readableCheck(n); err != nil {
return nil, err
}
return b.buff[b.readIdx : b.readIdx+n], nil
} | [
-0.5085187554359436,
0.8274970054626465,
0.6650483012199402,
0.6537654399871826,
0.09658820927143097,
0.12670987844467163,
0.003798304358497262,
-1.2308093309402466,
-0.06725117564201355,
-0.3181106448173523,
-0.27869322896003723,
0.029102971777319908,
-0.5793004631996155,
-0.0418412275612... |
func (b *defaultByteBuffer) Skip(n int) (err error) {
if b.status&BitReadable == 0 {
return errors.New("unreadable buffer, cannot support Skip")
}
if err = b.readableCheck(n); err != nil {
return err
}
b.readIdx += n
return nil
} | [
-1.072281837463379,
0.7222799062728882,
0.7392607927322388,
0.6616443395614624,
0.10383530706167221,
1.2214622497558594,
0.5700995326042175,
-0.8026168346405029,
-0.12955644726753235,
-0.1604379564523697,
-0.5293900966644287,
-0.17734424769878387,
-0.744838297367096,
-0.3147309124469757,
... |
func (b *defaultByteBuffer) ReadableLen() (n int) {
if b.status&BitReadable == 0 {
return -1
}
return b.writeIdx - b.readIdx
} | [
0.2677140235900879,
0.1587730348110199,
0.2461433708667755,
0.3497801125049591,
-0.07867642492055893,
0.9347558617591858,
0.4301031529903412,
0.33642250299453735,
-0.42445212602615356,
-0.15807244181632996,
0.061963390558958054,
-0.26025697588920593,
-0.8667683005332947,
-0.034219581633806... |
func (b *defaultByteBuffer) ReadString(n int) (s string, err error) {
if b.status&BitReadable == 0 {
return "", errors.New("unreadable buffer, cannot support ReadString")
}
var buf []byte
if buf, err = b.Next(n); err != nil {
return "", err
}
return string(buf), nil
} | [
-0.16470541059970856,
0.6975147128105164,
0.4873936176300049,
0.4617537558078766,
-0.3491562008857727,
0.3541829586029053,
0.10483502596616745,
-1.3124525547027588,
-0.2627035975456238,
0.25172317028045654,
0.23274536430835724,
-0.07329224050045013,
-0.6173177361488342,
-0.1530568152666092... |
func (b *defaultByteBuffer) ReadBinary(n int) (p []byte, err error) {
if b.status&BitReadable == 0 {
return p, errors.New("unreadable buffer, cannot support ReadBinary")
}
var buf []byte
if buf, err = b.Next(n); err != nil {
return p, err
}
p = make([]byte, n)
copy(p, buf)
return p, nil
} | [
-0.22814862430095673,
0.2507447898387909,
1.0062488317489624,
1.219746708869934,
0.13648304343223572,
0.09989418089389801,
-0.5885558128356934,
-1.5004606246948242,
0.20308798551559448,
0.5243686437606812,
-0.29766348004341125,
0.2768707573413849,
-1.1170331239700317,
0.5474223494529724,
... |
func (b *defaultByteBuffer) Malloc(n int) (buf []byte, err error) {
if b.status&BitWritable == 0 {
return nil, errors.New("unwritable buffer, cannot support Malloc")
}
b.ensureWritable(n)
currWIdx := b.writeIdx
b.writeIdx += n
return b.buff[currWIdx:b.writeIdx], nil
} | [
0.29046186804771423,
0.46181347966194153,
0.47007137537002563,
0.07454194873571396,
-0.012866181321442127,
0.42309054732322693,
0.2794581651687622,
-0.6527453064918518,
0.38251957297325134,
-0.12939783930778503,
0.034652091562747955,
0.08306892961263657,
-0.8715594410896301,
-0.13871745765... |
func (b *defaultByteBuffer) MallocLen() (length int) {
if b.status&BitWritable == 0 {
return -1
}
return b.writeIdx
} | [
0.20354828238487244,
0.19370046257972717,
0.25162702798843384,
0.041809406131505966,
-0.06408754736185074,
0.9207311868667603,
0.4294646978378296,
0.5931054353713989,
0.01725037954747677,
0.015895383432507515,
-0.1269555389881134,
-0.47769442200660706,
-1.253649115562439,
0.074812762439250... |
func (b *defaultByteBuffer) WriteString(s string) (n int, err error) {
if b.status&BitWritable == 0 {
return -1, errors.New("unwritable buffer, cannot support WriteString")
}
n = len(s)
b.ensureWritable(n)
copy(b.buff[b.writeIdx:b.writeIdx+n], s)
b.writeIdx += n
return
} | [
-1.1156424283981323,
0.36602887511253357,
0.5203964114189148,
0.3647727966308594,
0.45272380113601685,
-0.18139511346817017,
1.484207034111023,
-0.4922044277191162,
0.04138125106692314,
-0.27948081493377686,
-0.800235390663147,
0.22940710186958313,
-1.060050129890442,
-0.1290099024772644,
... |
func (b *defaultByteBuffer) WriteBinary(p []byte) (n int, err error) {
if b.status&BitWritable == 0 {
return -1, errors.New("unwritable buffer, cannot support WriteBinary")
}
n = len(p)
b.ensureWritable(n)
copy(b.buff[b.writeIdx:b.writeIdx+n], p)
b.writeIdx += n
return
} | [
-1.1453666687011719,
0.05898688733577728,
0.8285278081893921,
1.1130867004394531,
1.059287190437317,
-0.09772148728370667,
0.6010112166404724,
-0.6350802779197693,
-0.018159253522753716,
-0.024053974077105522,
-0.9719024300575256,
0.4759379029273987,
-1.724435806274414,
0.6026615500450134,... |
func (b *defaultByteBuffer) ReadLen() (n int) {
return b.readIdx
} | [
-0.06590154767036438,
0.276251882314682,
0.3321206271648407,
0.14537234604358673,
0.33658212423324585,
1.0234413146972656,
0.00032394242589361966,
0.19997797906398773,
-0.02899247594177723,
-1.2695128917694092,
-0.8317593336105347,
0.4200511872768402,
-0.974796712398529,
-0.311204403638839... |
func (b *defaultByteBuffer) Flush() (err error) {
if b.status&BitWritable == 0 {
return errors.New("unwritable buffer, cannot support Flush")
}
return nil
} | [
0.30068981647491455,
0.3045302629470825,
0.2992321252822876,
0.5675826668739319,
0.6032720804214478,
0.8864564299583435,
0.6327937245368958,
0.15969154238700867,
-0.3744853436946869,
-0.5914512872695923,
-0.07282761484384537,
0.9531311988830566,
-1.2795616388320923,
1.0906213521957397,
-... |
func (b *defaultByteBuffer) AppendBuffer(buf ByteBuffer) (n int, err error) {
subBuf := buf.(*defaultByteBuffer)
n = subBuf.writeIdx
b.ensureWritable(n)
copy(b.buff[b.writeIdx:b.writeIdx+n], subBuf.buff)
b.writeIdx += n
buf.Release(nil)
return
} | [
-0.1992938220500946,
0.5686742663383484,
0.537499189376831,
0.039676837623119354,
0.42512521147727966,
0.06525793671607971,
0.6058495044708252,
0.22071979939937592,
0.4187692701816559,
-0.5153281688690186,
-1.0857387781143188,
0.37415429949760437,
-1.5158390998840332,
0.9354724884033203,
... |
func (b *defaultByteBuffer) Bytes() (buf []byte, err error) {
if b.status&BitWritable == 0 {
return nil, errors.New("unwritable buffer, cannot support Bytes")
}
buf = make([]byte, b.writeIdx)
copy(buf, b.buff[:b.writeIdx])
return buf, nil
} | [
-0.5985053181648254,
-0.1275639533996582,
0.37980419397354126,
0.33657968044281006,
0.6042303442955017,
0.23680779337882996,
-0.12309224903583527,
-0.1552945077419281,
0.43984994292259216,
-0.8646645545959473,
-0.29634666442871094,
0.7498419880867004,
-1.0351592302322388,
0.065932102501392... |
func (b *defaultByteBuffer) NewBuffer() ByteBuffer {
return NewWriterBuffer(256)
} | [
0.24161285161972046,
-0.1305181384086609,
0.25699034333229065,
0.6402125954627991,
0.010364552959799767,
-0.5507126450538635,
0.3071487545967102,
0.44994133710861206,
0.5100915431976318,
-0.7827683687210083,
-0.914499819278717,
0.3588699996471405,
-1.4805631637573242,
0.36282360553741455,
... |
func (b *defaultByteBuffer) Release(e error) (err error) {
b.zero()
bytebufPool.Put(b)
return
} | [
-0.3296198546886444,
0.6145615577697754,
0.20674702525138855,
0.4329264760017395,
0.9945517182350159,
0.25727352499961853,
0.5298963785171509,
0.009640982374548912,
0.0330965630710125,
-0.3401244878768921,
-0.8080522418022156,
0.6843080520629883,
-1.6737421751022339,
0.9543244242668152,
... |
func NewGroupGate(set Set) GroupGate {
return GroupGate{set}
} | [
-0.40234580636024475,
-0.3711603879928589,
-0.05695080757141113,
0.40067753195762634,
-1.6934306621551514,
-0.03705943375825882,
-0.6147213578224182,
-0.7142673134803772,
-0.6215977072715759,
1.1320077180862427,
0.2571903467178345,
1.3578579425811768,
-1.0729197263717651,
0.628374099731445... |
func (GroupGate) Key() GateKey {
return GroupGateKey
} | [
0.3680325746536255,
-0.3978586494922638,
0.28100523352622986,
0.5950690507888794,
-0.21927514672279358,
1.3084611892700195,
1.028578519821167,
-0.4461502432823181,
-0.7560135126113892,
1.0428621768951416,
0.5652164220809937,
0.5971033573150635,
-1.4030507802963257,
0.40105578303337097,
-... |
func (g GroupGate) IsOpen(f feature.Feature, a actor.Actor) bool {
for name := range g.value {
if f, ok := registry[name]; ok && f(a) {
return true
}
}
return false
} | [
-0.987074077129364,
-0.3964438736438751,
0.4799637496471405,
0.4897264242172241,
-0.3868136703968048,
-0.3681780695915222,
1.0663812160491943,
0.6768158078193665,
-0.7853264808654785,
0.8391493558883667,
0.7011509537696838,
0.7960562705993652,
-0.34384506940841675,
0.0045526521280407906,
... |
func (g GroupGate) SetValue() Set {
return g.value
} | [
0.4369879364967346,
0.766501784324646,
0.38945552706718445,
0.33993062376976013,
0.09353259205818176,
0.45266035199165344,
0.7038173675537109,
-0.7193865180015564,
-0.45272746682167053,
0.4404660165309906,
0.5832498669624329,
0.40424853563308716,
-0.7060065269470215,
0.5178669691085815,
... |
func RegisterGroup(name string, f GroupFunc) {
registry[name] = f
} | [
-0.3827662765979767,
1.6689982414245605,
0.04078938066959381,
0.11867889761924744,
0.35494059324264526,
-0.6027658581733704,
0.6760863661766052,
0.48162364959716797,
-1.0341452360153198,
0.028612563386559486,
-0.5559726357460022,
0.9037036299705505,
0.5014225244522095,
0.4566428065299988,
... |
func InitializeSystemModels() *gorm.DB {
log.Println("Initialize system models")
db := GetGORMDbConnection()
defer Close(db)
db.AutoMigrate(
&System{},
&EncryptionKey{},
&Secret{},
)
db.Model(&System{}).AddForeignKey("group_id", "groups(group_id)", "RESTRICT", "RESTRICT")
db.Model(&EncryptionKey{}).AddFo... | [
-0.4636516869068146,
0.3334120512008667,
0.5347942113876343,
0.7434478998184204,
1.2171469926834106,
0.33317095041275024,
-0.038700416684150696,
-0.5878405570983887,
-0.684697151184082,
0.12904898822307587,
-1.090625286102295,
-0.32507675886154175,
-0.9770920276641846,
0.9715466499328613,
... |
func (system *System) SaveSecret(hashedSecret string) error {
db := GetGORMDbConnection()
defer Close(db)
secret := Secret{
Hash: hashedSecret,
SystemID: system.ID,
}
if err := system.DeactivateSecrets(); err != nil {
return err
}
if err := db.Create(&secret).Error; err != nil {
return fmt.Errorf(... | [
0.6056455373764038,
0.2757001519203186,
0.7150549292564392,
0.3378969132900238,
1.273550033569336,
0.16285233199596405,
0.026121102273464203,
-0.2592673599720001,
-0.20384694635868073,
-0.05525291711091995,
-1.848060965538025,
-0.51347815990448,
-0.7047256827354431,
0.8810266852378845,
1... |
func (system *System) GetSecret() (string, error) {
db := GetGORMDbConnection()
defer Close(db)
secret := Secret{}
err := db.Where("system_id = ?", system.ID).First(&secret).Error
if err != nil {
return "", fmt.Errorf("unable to get hashed secret for clientID %s: %s", system.ClientID, err.Error())
}
if secr... | [
0.907025158405304,
0.5823319554328918,
0.4870895445346832,
0.6345429420471191,
0.8093147873878479,
-0.7453111410140991,
-0.2942030131816864,
-1.2559442520141602,
-0.475985586643219,
-0.14491119980812073,
-0.17473405599594116,
0.3967778980731964,
-0.7083148956298828,
0.30433401465415955,
... |
func (system *System) DeactivateSecrets() error {
db := GetGORMDbConnection()
defer Close(db)
err := db.Where("system_id = ?", system.ID).Delete(&Secret{}).Error
if err != nil {
return fmt.Errorf("unable to soft delete previous secrets for clientID %s: %s", system.ClientID, err.Error())
}
return nil
} | [
0.20395904779434204,
0.00965744350105524,
0.12440693378448486,
0.14299388229846954,
0.5486735105514526,
-0.013571808114647865,
0.9949231743812561,
0.033818941563367844,
-0.5054298043251038,
0.33833205699920654,
-0.22971725463867188,
0.4904271364212036,
-1.1797728538513184,
0.94847673177719... |
func (system *System) GetEncryptionKey(trackingID string) (EncryptionKey, error) {
db := GetGORMDbConnection()
defer Close(db)
getKeyEvent := Event{Op: "GetEncryptionKey", TrackingID: trackingID, ClientID: system.ClientID}
OperationStarted(getKeyEvent)
var encryptionKey EncryptionKey
err := db.Where("system_id ... | [
-0.1360851675271988,
0.8076810836791992,
0.5483721494674683,
-0.10348963737487793,
0.9987303614616394,
-0.1912686675786972,
0.7361559867858887,
-1.0717235803604126,
-0.7890140414237976,
1.1402305364608765,
-0.018843725323677063,
0.324519544839859,
-0.37377485632896423,
0.961264431476593,
... |
func (system *System) SavePublicKey(publicKey io.Reader) error {
db := GetGORMDbConnection()
defer Close(db)
k, err := ioutil.ReadAll(publicKey)
if err != nil {
return fmt.Errorf("cannot read public key for clientID %s: %s", system.ClientID, err.Error())
}
key, err := ReadPublicKey(string(k))
if err != nil {... | [
-0.1211622953414917,
0.0699472576379776,
0.5790398716926575,
-0.16138368844985962,
0.4428746998310089,
-0.11820521950721741,
0.6208941340446472,
-0.4938596189022064,
-0.39820802211761475,
1.1274303197860718,
-0.6207005977630615,
-0.27949798107147217,
-1.0438939332962036,
1.2712184190750122... |
func (system *System) RevokeSystemKeyPair() error {
db := GetGORMDbConnection()
defer Close(db)
var encryptionKey EncryptionKey
err := db.Where("system_id = ?", system.ID).Find(&encryptionKey).Error
if err != nil {
return err
}
err = db.Delete(&encryptionKey).Error
if err != nil {
return err
}
return ... | [
0.4877380132675171,
-0.6431617736816406,
0.6442338824272156,
-0.2195681482553482,
-0.5617772340774536,
0.2117065042257309,
0.24464990198612213,
0.5834968686103821,
-0.371576726436615,
0.6975208520889282,
0.25635194778442383,
0.48292455077171326,
-1.189402461051941,
0.6101127862930298,
0.... |
func (system *System) GenerateSystemKeyPair() (string, error) {
db := GetGORMDbConnection()
defer Close(db)
var key EncryptionKey
if !db.Where("system_id = ?", system.ID).Find(&key).RecordNotFound() {
return "", fmt.Errorf("encryption keypair already exists for system ID %d", system.ID)
}
privateKey, err := r... | [
-1.1540802717208862,
0.015970028936862946,
0.7820687890052795,
-0.16250208020210266,
0.09019231051206589,
0.08367310464382172,
-0.5390219688415527,
-0.9931036829948425,
-0.0436742827296257,
0.7816660404205322,
-0.5968399047851562,
-0.1758381873369217,
-1.154944896697998,
1.2982007265090942... |
func RegisterSystem(clientName string, groupID string, scope string, publicKeyPEM string, trackingID string) (Credentials, error) {
db := GetGORMDbConnection()
defer Close(db)
// A system is not valid without an active public key and a hashed secret. However, they are stored separately in the
// encryption_keys a... | [
-0.41385212540626526,
0.5891990065574646,
0.8794368505477905,
0.1233227401971817,
0.6596804261207581,
-0.12242187559604645,
0.2770727276802063,
-0.5948998928070068,
-0.4963367283344269,
0.12327890843153,
-0.5762826204299927,
-0.21327075362205505,
-0.929865837097168,
0.08713480830192566,
... |
func XDataFor(system System) (string, error) {
group, err := FindByGroupID(system.GroupID)
if err != nil {
return "", fmt.Errorf("no group for system %d; %s", system.ID, err)
}
Logger.Info("group xdata '", group, "'")
// strconv.Unquote here?
return group.XData, nil
} | [
-0.20603901147842407,
0.2343951165676117,
0.238378643989563,
-1.0202723741531372,
-0.5491366982460022,
0.19762861728668213,
-0.42458826303482056,
-0.747146487236023,
-0.28976815938949585,
-0.20055565237998962,
0.8182725310325623,
0.5195085406303406,
0.22836807370185852,
0.826133668422699,
... |
func GetSystemByClientID(clientID string) (System, error) {
var (
db = GetGORMDbConnection()
system System
err error
)
defer Close(db)
if db.Find(&system, "client_id = ?", clientID).RecordNotFound() {
err = fmt.Errorf("no System record found for client %s", clientID)
}
return system, err
} | [
0.7424166798591614,
-0.1297045350074768,
0.24308794736862183,
-0.26058241724967957,
0.5217871069908142,
-0.12126857042312622,
0.806260347366333,
-1.4143953323364258,
-0.3452467918395996,
0.357759028673172,
0.28224509954452515,
0.3056447505950928,
-0.6625928282737732,
0.6972724199295044,
... |
func GetSystemByID(id string) (System, error) {
var (
db = GetGORMDbConnection()
system System
err error
)
defer Close(db)
if _, err = strconv.ParseUint(id, 10, 64); err != nil {
return System{}, fmt.Errorf("invalid input %s; %s", id, err)
}
// must use the explicit where clause here because the i... | [
0.03449443727731705,
-0.20234467089176178,
0.3884650468826294,
-0.11008183658123016,
0.15292969346046448,
-0.5675338506698608,
0.3167106807231903,
-0.9521013498306274,
0.17170874774456024,
-0.2879510521888733,
0.25976189970970154,
-0.06697279959917068,
-0.8731575608253479,
0.39022028446197... |
func (system *System) ResetSecret(trackingID string) (Credentials, error) {
db := GetGORMDbConnection()
defer Close(db)
creds := Credentials{}
newSecretEvent := Event{Op: "ResetSecret", TrackingID: trackingID, ClientID: system.ClientID}
OperationStarted(newSecretEvent)
secretString, err := GenerateSecret()
if... | [
0.4215436279773712,
0.17181997001171112,
0.8464673161506653,
-0.06668493896722794,
0.4163585603237152,
-0.12345940619707108,
0.06499156355857849,
-0.5881885290145874,
-0.6393749117851257,
0.4597647190093994,
-0.7980089783668518,
0.5293248295783997,
-0.4151594638824463,
-0.10001937299966812... |
func CleanDatabase(group Group) error {
var (
system System
encryptionKey EncryptionKey
secret Secret
systemIds []int
db = GetGORMDbConnection()
)
defer Close(db)
if group.ID == 0 {
return fmt.Errorf("invalid group.ID")
}
foundGroup := Group{GroupID: group.GroupID}
err ... | [
-0.6354009509086609,
0.14835608005523682,
0.8967793583869934,
0.30962660908699036,
0.39824336767196655,
-0.1659603863954544,
0.9500098824501038,
-0.5602489709854126,
-0.23808197677135468,
0.6433603763580322,
0.61252760887146,
0.04730226844549179,
-0.9550897479057312,
1.4365947246551514,
... |
func LoadConfig() []models.Subscriber {
return db.LoadConfiguration(fILEADDRESS)
} | [
0.8349935412406921,
0.5724706053733826,
0.3308011591434479,
-0.016512654721736908,
0.6154143810272217,
-0.9356163144111633,
-1.2072467803955078,
1.5641708374023438,
-0.7427376508712769,
0.5272391438484192,
-0.6649640798568726,
-0.25177663564682007,
-0.4517958164215088,
1.7941348552703857,
... |
func addOption(c *ConfigParser, section, option, value string) {
c.sections[section].options[option] = value
} | [
0.6371673345565796,
-1.1445226669311523,
0.3756275475025177,
0.42652106285095215,
0.534436821937561,
0.4160141944885254,
-0.5424278974533081,
0.46520185470581055,
-0.19323398172855377,
0.7552801966667175,
0.21240153908729553,
-0.5226196646690369,
0.4990757405757904,
0.5900541543960571,
0... |
func addInter(c *ConfigParser, section, option string, idata []string) (retval error) {
retval = nil
refsection := idata[0]
value := idata[1]
if refsection == "local" {
refsection = section
}
inter := InterpolateObj{value, refsection}
c.sections[section].interpolate[option] = inter
return
} | [
0.06886778026819229,
-0.8141136765480042,
0.8741791844367981,
-0.17663271725177765,
0.11297573149204254,
0.7227439880371094,
-0.6958057880401611,
0.22206458449363708,
-0.52488774061203,
-0.25051242113113403,
0.5502954125404358,
-0.46864455938339233,
-1.5520672798156738,
0.6210471391677856,... |
func (c *ConfigParser) HasSection(section string) bool {
if _, ok := c.sections[section]; ok {
return true
} else {
return false
}
} | [
-0.22012408077716827,
-0.5568628311157227,
0.49477291107177734,
-0.5442050099372864,
0.16867531836032867,
-0.3429096043109894,
-0.35463032126426697,
0.7584695219993591,
-1.0484919548034668,
-0.23633845150470734,
-0.16620488464832306,
-0.94709312915802,
0.39643609523773193,
1.18246114253997... |
func (c *ConfigParser) HasOption(section, option string) bool {
if c.HasSection(section) {
if _, ok := c.sections[section].options[option]; ok {
return true
} else {
return false
}
} else {
return false
}
} | [
0.6174271702766418,
-0.8185910582542419,
0.508858323097229,
0.27904680371284485,
0.5114826560020447,
-0.6158719062805176,
-0.5711376667022705,
0.6313146948814392,
-0.6735638976097107,
0.7011266350746155,
-0.30689892172813416,
-0.5691095590591431,
0.27849459648132324,
0.6710671186447144,
... |
func (c *ConfigParser) regexp(regexp string) *regexp.Regexp {
return c.regexps[regexp]
} | [
0.8552739024162292,
-0.5422019958496094,
0.2538365423679352,
0.38980817794799805,
0.3662530779838562,
0.0452863909304142,
0.13077858090400696,
0.33535778522491455,
0.18537306785583496,
0.3819350302219391,
0.29926151037216187,
0.10588552802801132,
-0.27620115876197815,
-0.5525813102722168,
... |
func (c *ConfigParser) GetOption(section, option string) (value string, retval error) {
retval = nil
value = ""
if c.HasSection(section) {
if c.HasOption(section, option) {
value = c.sections[section].options[option]
} else {
etext := fmt.Sprintf("Option '%s' does not exist in section '%s'.\n", option, sec... | [
0.4591796100139618,
-0.7597898840904236,
0.6802276968955994,
0.28582513332366943,
0.4086954593658447,
-0.34785041213035583,
-0.014524141326546669,
-0.2913665473461151,
-0.4996885657310486,
1.0161092281341553,
0.7165045738220215,
0.019893458113074303,
-0.25753647089004517,
0.617259323596954... |
func (c *ConfigParser) setSecOpt(section, option, value string) {
c.sections[section].options[option] = value
} | [
0.49469274282455444,
-1.109358310699463,
0.2343055158853531,
-0.17922687530517578,
-0.0540056936442852,
-0.33154693245887756,
-0.6226398348808289,
-0.16927433013916016,
-0.5854371190071106,
0.7048859596252441,
-0.5706292986869812,
-0.04575992003083229,
0.5185784697532654,
0.286368131637573... |
func (c *ConfigParser) addSecOpt(section, option, value string) (retval error) {
retval = nil
addOption(c, section, option, value)
igroup := c.regexp("inter").FindStringSubmatch(value)
if len(igroup) == 3 {
retval = addInter(c, section, option, igroup[1:])
}
return retval
} | [
0.5157548785209656,
0.3325631618499756,
0.8435879945755005,
0.2536627948284149,
-0.18223319947719574,
-0.566170871257782,
-0.07310324162244797,
-0.11842577904462814,
-0.025333723053336143,
0.35300394892692566,
-0.0665198415517807,
-0.3120008111000061,
-1.1900110244750977,
-0.47023040056228... |
func (c *ConfigParser) addSection(section string) {
options := make(map[string]string)
interpolate := make(map[string]InterpolateObj)
sd := SectionData{options, interpolate}
c.sections[section] = sd
} | [
-0.28936508297920227,
-0.6320316791534424,
0.4904344379901886,
-0.3863990604877472,
0.003278606105595827,
0.8459919095039368,
-0.3398403227329254,
0.3303089737892151,
-0.663192629814148,
-0.7807728052139282,
0.04732406139373779,
-0.3980351984500885,
0.44657307863235474,
0.9555633664131165,... |
func (c *ConfigParser) GetSections() (sectionList []string) {
sectionList = make([]string, len(c.sections))
for key, _ := range c.sections {
sectionList = append(sectionList, key)
}
return
} | [
-0.29495540261268616,
-0.8101855516433716,
0.27006813883781433,
0.32770946621894836,
0.8221173882484436,
0.1774216890335083,
-0.48805665969848633,
-0.31642499566078186,
-0.3731219172477722,
0.15693256258964539,
-0.23791824281215668,
-0.27794548869132996,
-0.3445683419704437,
1.212625145912... |
func (c *ConfigParser) interpolation() error {
var retval error = nil
var refsection string
for _, section := range c.GetSections() {
if len(c.sections[section].interpolate) > 0 {
for key, irefval := range c.sections[section].interpolate {
refsection = irefval.refSection
if c.HasSection(refsection) {
... | [
-0.1603386402130127,
-0.3683844804763794,
1.0048874616622925,
-0.22404654324054718,
0.16042852401733398,
-0.24691583216190338,
0.1957601010799408,
-0.04573914408683777,
-0.8637247085571289,
0.554157018661499,
1.006914734840393,
-1.3522257804870605,
-0.8706813454627991,
1.6107949018478394,
... |
func (c *ConfigParser) interpolate(section, key, refsection, irefkey string) {
current, _ := c.GetOption(section, key)
ival, _ := c.GetOption(refsection, irefkey)
replacement := c.regexp("inter").ReplaceAllLiteralString(current, ival)
c.setSecOpt(section, key, replacement)
} | [
0.058730680495500565,
-0.3219701945781708,
0.7692500352859497,
-0.5187439918518066,
0.3493507504463196,
-0.39059770107269287,
-0.8043845891952515,
0.8037688732147217,
-0.8639797568321228,
0.9082159996032715,
0.8352082371711731,
-0.10572584718465805,
-1.3044027090072632,
0.5119653940200806,... |
func (c *ConfigParser) Parse() (err error) {
err = nil
fd, err := os.Open(c.fname)
if err != nil {
return
}
defer fd.Close()
var section string
scanner := bufio.NewScanner(fd)
for scanner.Scan() {
line := scanner.Text()
switch {
case c.regexp("secMatch").MatchString(line):
section = c.regexp("secMatc... | [
-0.26247790455818176,
-0.06065715104341507,
0.8812112808227539,
0.40258359909057617,
0.6566113233566284,
-0.03464607894420624,
0.7792301774024963,
0.13589546084403992,
-1.0856683254241943,
0.014135150238871574,
0.16860447824001312,
-0.7038461565971375,
-0.2839946448802948,
1.04945838451385... |
func (c *ConfigParser) GetConfigMap() (confmap map[string]map[string]string, err error) {
confmap = make(map[string]map[string]string)
err = c.Parse()
if err != nil {
return
}
for section, secdata := range c.sections {
confmap[section] = make(map[string]string)
for option, value := range secdata.options {
... | [
-0.9249253273010254,
-0.8806514739990234,
0.6863619089126587,
0.03877464681863785,
0.33564722537994385,
0.13905557990074158,
-0.4917258024215698,
0.2867981195449829,
-0.5738028883934021,
0.10552272200584412,
-0.7807396650314331,
-0.4416348338127136,
-0.23019732534885406,
0.9591799974441528... |
func (c *ConfigParser) GetFlatConfigMap() (flatmap map[string]string, err error) {
flatmap = make(map[string]string)
if !c.parsed {
err = c.Parse()
if err != nil {
return
}
}
for _, secdata := range c.sections {
for option, value := range secdata.options {
if _, ok := flatmap[option]; ok {
etext :... | [
-1.0101375579833984,
-0.4452504813671112,
0.6976808309555054,
-0.24578048288822174,
0.46967044472694397,
0.8393789529800415,
0.17964047193527222,
-0.651784360408783,
-0.31150805950164795,
-0.05989100784063339,
-0.3910534977912903,
-0.0295909084379673,
-0.3956303298473358,
0.657445013523101... |
func buildKey(name, section string) (key string) {
if section == "" {
key = name
} else {
key = fmt.Sprintf("%s-%s", name, section)
}
return
} | [
-0.33632946014404297,
-0.299030065536499,
0.44894298911094666,
0.27128341794013977,
0.1273382306098938,
-0.041584137827157974,
-0.8576266765594482,
0.7334573268890381,
-0.7624524235725403,
1.4325758218765259,
0.10784510523080826,
0.1768476665019989,
-0.18380329012870789,
0.3621197938919067... |
func New(c *Config) (*Master, error) {
if c.KubeletClient == nil {
return nil, fmt.Errorf("Master.New() called with config.KubeletClient == nil")
}
s, err := genericapiserver.New(c.Config)
if err != nil {
return nil, err
}
m := &Master{
GenericAPIServer: s,
enableCoreControllers: c.EnableCoreCo... | [
0.04770055040717125,
-0.710326075553894,
0.4476422369480133,
-0.4694921374320984,
-0.3300202786922455,
-0.03284042328596115,
-0.18150170147418976,
0.30366596579551697,
0.25401178002357483,
0.37339457869529724,
-0.25681260228157043,
-0.3945061266422272,
-0.24955371022224426,
0.7296444773674... |
func (m *Master) NewBootstrapController() *Controller {
return &Controller{
NamespaceRegistry: m.namespaceRegistry,
ServiceRegistry: m.serviceRegistry,
MasterCount: m.MasterCount,
EndpointRegistry: m.endpointRegistry,
EndpointInterval: 10 * time.Second,
ServiceClusterIPRegistry: m.serviceClusterI... | [
0.2917100489139557,
-0.3866179287433624,
0.3845039904117584,
-0.6126172542572021,
-0.8162925243377686,
-0.8193812966346741,
0.06524921208620071,
-0.4659835696220398,
0.4303317368030548,
-0.21141721308231354,
0.30892911553382874,
0.2429497241973877,
-0.1740046590566635,
0.06870437413454056,... |
func (m *Master) HasThirdPartyResource(rsrc *extensions.ThirdPartyResource) (bool, error) {
_, group, err := thirdpartyresourcedata.ExtractApiGroupAndKind(rsrc)
if err != nil {
return false, err
}
path := makeThirdPartyPath(group)
services := m.HandlerContainer.RegisteredWebServices()
for ix := range services {... | [
-0.07088419049978256,
-0.6785841584205627,
0.5942306518554688,
-1.0574947595596313,
-0.7489880919456482,
-0.26120391488075256,
-0.11802001297473907,
0.49549591541290283,
0.05844533443450928,
0.06312382966279984,
-0.1955476701259613,
-0.5208874344825745,
-0.7926521301269531,
1.0898172855377... |
func (m *Master) RemoveThirdPartyResource(path string) error {
if err := m.removeThirdPartyStorage(path); err != nil {
return err
}
services := m.HandlerContainer.RegisteredWebServices()
for ix := range services {
root := services[ix].RootPath()
if root == path || strings.HasPrefix(root, path+"/") {
m.Han... | [
-0.11392027139663696,
-1.0017852783203125,
0.4648429751396179,
-0.5907705426216125,
-1.3240090608596802,
0.2928365170955658,
0.5542646050453186,
0.6196567416191101,
0.09271988272666931,
0.38358423113822937,
0.07944467663764954,
-0.5424879193305969,
-0.8820392489433289,
0.7136922478675842,
... |
func (m *Master) ListThirdPartyResources() []string {
m.thirdPartyResourcesLock.RLock()
defer m.thirdPartyResourcesLock.RUnlock()
result := []string{}
for key := range m.thirdPartyResources {
result = append(result, key)
}
return result
} | [
-0.2916063964366913,
-1.577936053276062,
0.08095119893550873,
-0.9860658049583435,
-0.5657359957695007,
-0.2894194424152374,
-1.4095193147659302,
0.11156514286994934,
0.16612882912158966,
0.9716885685920715,
-0.17169606685638428,
-0.28029143810272217,
-1.282530665397644,
0.1989495903253555... |
func (m *Master) getExtensionResources(c *Config) map[string]rest.Storage {
// All resources except these are disabled by default.
enabledResources := sets.NewString("daemonsets", "deployments", "horizontalpodautoscalers", "ingresses", "jobs", "replicasets")
resourceOverrides := m.ApiGroupVersionOverrides["extension... | [
-0.012037690728902817,
0.35864800214767456,
0.6688209176063538,
0.09965094178915024,
-0.3866628110408783,
-0.6720061898231506,
-0.3207036852836609,
0.3569316864013672,
0.6553364396095276,
0.4187335968017578,
-0.5147676467895508,
-0.5174323916435242,
-0.6888198852539062,
0.08950583636760712... |
func (m *Master) constructHPAResources(c *Config, restStorage map[string]rest.Storage) {
// Note that hpa's storage settings are changed by changing the autoscaling
// group. Clearly we want all hpas to be stored in the same place no
// matter where they're accessed from.
restOptions := func(resource string) generi... | [
-0.47826412320137024,
-0.3136029839515686,
0.4713185131549835,
-0.026253392919898033,
0.15434730052947998,
-0.30143335461616516,
0.17607372999191284,
0.40162941813468933,
-0.1605532169342041,
-0.5597747564315796,
-0.304032564163208,
-0.9964290857315063,
0.1276608258485794,
1.00070643424987... |
func (m *Master) getAutoscalingResources(c *Config) map[string]rest.Storage {
resourceOverrides := m.ApiGroupVersionOverrides["autoscaling/v1"].ResourceOverrides
isEnabled := func(resource string) bool {
// Check if the resource has been overriden.
if enabled, ok := resourceOverrides[resource]; ok {
return ena... | [
-0.8669625520706177,
0.32876864075660706,
0.42333316802978516,
0.4366317689418793,
-0.7018954753875732,
-0.6320875883102417,
-0.44731301069259644,
0.3779359757900238,
-0.3939214050769806,
0.26518625020980835,
-0.8922489285469055,
-0.9764716625213623,
-0.8036418557167053,
0.6003327965736389... |
func (m *Master) constructJobResources(c *Config, restStorage map[string]rest.Storage) {
// Note that job's storage settings are changed by changing the batch
// group. Clearly we want all jobs to be stored in the same place no
// matter where they're accessed from.
restOptions := func(resource string) generic.REST... | [
-0.1674797236919403,
-0.22011007368564606,
0.2832823395729065,
-0.25718337297439575,
-0.29611480236053467,
-0.43110191822052,
-0.18331679701805115,
0.7659978270530701,
-0.5613524913787842,
-0.6206091046333313,
-0.6992246508598328,
-0.9182215929031372,
0.2301163375377655,
0.4850687682628631... |
func (m *Master) getBatchResources(c *Config) map[string]rest.Storage {
resourceOverrides := m.ApiGroupVersionOverrides["batch/v1"].ResourceOverrides
isEnabled := func(resource string) bool {
// Check if the resource has been overriden.
if enabled, ok := resourceOverrides[resource]; ok {
return enabled
}
r... | [
-0.36764174699783325,
0.15478172898292542,
0.3772423267364502,
0.46681731939315796,
-0.7934121489524841,
-0.45922544598579407,
-0.5526539087295532,
0.6444178223609924,
-0.11882102489471436,
-0.24299347400665283,
-0.6936331391334534,
-0.4362339675426483,
-0.8184796571731567,
0.3714480400085... |
func findExternalAddress(node *api.Node) (string, error) {
var fallback string
for ix := range node.Status.Addresses {
addr := &node.Status.Addresses[ix]
if addr.Type == api.NodeExternalIP {
return addr.Address, nil
}
if fallback == "" && addr.Type == api.NodeLegacyHostIP {
fallback = addr.Address
}
... | [
0.17443063855171204,
0.1887173354625702,
0.844368040561676,
-0.4647769331932068,
-0.5828395485877991,
-0.3383789658546448,
-0.3044399917125702,
0.15498892962932587,
0.5034595727920532,
0.6524730920791626,
0.8741291165351868,
0.0670953094959259,
-0.6316559314727783,
0.9081214666366577,
0.... |
func setPrefix(prefix string, m map[string]string) map[string]string {
n := make(map[string]string)
for k, v := range m {
n[prefix+k] = prefix + v
}
return n
} | [
-0.6604968905448914,
-0.5339107513427734,
0.3642283082008362,
-0.2637239396572113,
-0.9936763048171997,
-0.4182957112789154,
-1.0196523666381836,
0.6839343905448914,
-0.14572417736053467,
0.4238157570362091,
-0.5197060704231262,
0.3898637294769287,
0.7275835871696472,
0.42141056060791016,
... |
func NewEnvironmentUsageDto() *EnvironmentUsageDto {
this := EnvironmentUsageDto{}
return &this
} | [
-0.9265016913414001,
-0.25949206948280334,
0.07004117965698242,
-1.0295809507369995,
0.29127323627471924,
-0.7766332030296326,
0.5780419111251831,
-0.43285349011421204,
-0.6422847509384155,
0.1880870908498764,
-0.3033764958381653,
0.28687506914138794,
-0.12250418215990067,
0.52580159902572... |
func NewEnvironmentUsageDtoWithDefaults() *EnvironmentUsageDto {
this := EnvironmentUsageDto{}
return &this
} | [
-0.8582282662391663,
0.18370716273784637,
0.014871547929942608,
-0.8031675815582275,
0.8771754503250122,
-1.065037488937378,
0.08929649740457535,
-0.5820229053497314,
-0.4340797960758209,
-0.24694357812404633,
-0.4053012430667877,
-0.484195351600647,
-0.16602766513824463,
0.636895477771759... |
func (o *EnvironmentUsageDto) GetEnvironmentUuid() string {
if o == nil || o.EnvironmentUuid == nil {
var ret string
return ret
}
return *o.EnvironmentUuid
} | [
-0.10483018308877945,
0.0350501611828804,
0.2686348259449005,
0.2866751551628113,
-0.22664636373519897,
0.27760452032089233,
1.18807053565979,
0.49139103293418884,
0.5263870358467102,
0.35586264729499817,
0.21982431411743164,
-1.4049715995788574,
-0.8531275391578674,
0.5908931493759155,
... |
func (o *EnvironmentUsageDto) GetEnvironmentUuidOk() (*string, bool) {
if o == nil || o.EnvironmentUuid == nil {
return nil, false
}
return o.EnvironmentUuid, true
} | [
-0.5563955903053284,
0.0056343115866184235,
0.2452578991651535,
-0.08257238566875458,
-0.09685482829809189,
0.4690578281879425,
0.9445891380310059,
0.7425124645233154,
-0.36999115347862244,
1.7222295999526978,
0.04330595210194588,
-1.2162563800811768,
0.12304612994194031,
0.234343588352203... |
func (o *EnvironmentUsageDto) HasEnvironmentUuid() bool {
if o != nil && o.EnvironmentUuid != nil {
return true
}
return false
} | [
-0.15664991736412048,
0.31182435154914856,
0.047282472252845764,
-0.3324904441833496,
0.1519222855567932,
-0.2671239376068115,
0.5900944471359253,
0.8831731081008911,
-0.49381887912750244,
0.7225297689437866,
-0.016026418656110764,
-1.2183164358139038,
-0.36738747358322144,
0.9370709657669... |
func (o *EnvironmentUsageDto) SetEnvironmentUuid(v string) {
o.EnvironmentUuid = &v
} | [
-0.16944007575511932,
-0.46060940623283386,
0.02548549324274063,
-1.0334105491638184,
-0.61970055103302,
0.16830183565616608,
0.4195484519004822,
0.10660689324140549,
-0.4593450725078583,
1.229819893836975,
0.3377230167388916,
0.07793314009904861,
-0.540285587310791,
-0.2249893695116043,
... |
func (o *EnvironmentUsageDto) GetVisits() int64 {
if o == nil || o.Visits == nil {
var ret int64
return ret
}
return *o.Visits
} | [
-0.30348140001296997,
1.211738109588623,
0.15254229307174683,
0.6483867168426514,
0.05455629527568817,
-0.6748430728912354,
1.3159469366073608,
-0.4377327561378479,
0.9062439799308777,
-0.8592086434364319,
0.39785531163215637,
-1.2746995687484741,
-0.42830029129981995,
0.57498699426651,
... |
func (o *EnvironmentUsageDto) GetVisitsOk() (*int64, bool) {
if o == nil || o.Visits == nil {
return nil, false
}
return o.Visits, true
} | [
-0.6263044476509094,
0.7513221502304077,
0.20482656359672546,
0.3219550848007202,
-0.14280836284160614,
-0.47140926122665405,
1.3417513370513916,
-0.2856510579586029,
0.05494126304984093,
0.10742049664258957,
-0.8431559205055237,
-0.30583029985427856,
0.44981908798217773,
0.449383556842803... |
func (o *EnvironmentUsageDto) HasVisits() bool {
if o != nil && o.Visits != nil {
return true
}
return false
} | [
0.42937374114990234,
1.2505278587341309,
0.2593715190887451,
-0.34440308809280396,
0.7770066261291504,
-0.2786712348461151,
0.9098278880119324,
0.2847573161125183,
0.06621680408716202,
-0.9028192758560181,
-0.16291531920433044,
-0.8110566139221191,
0.22655914723873138,
0.13050714135169983,... |
func (o *EnvironmentUsageDto) SetVisits(v int64) {
o.Visits = &v
} | [
-0.33653175830841064,
1.1536051034927368,
0.010773386806249619,
-0.10261812806129456,
-0.41406089067459106,
-0.4152079224586487,
0.5703690052032471,
-1.558414101600647,
0.16181980073451996,
-0.09012638032436371,
0.4042562246322632,
0.4561197757720947,
0.1561145782470703,
-0.051879469305276... |
func (o *EnvironmentUsageDto) GetMobileSessions() int64 {
if o == nil || o.MobileSessions == nil {
var ret int64
return ret
}
return *o.MobileSessions
} | [
0.1442931443452835,
-0.6713457703590393,
0.20781241357326508,
1.182543158531189,
-0.7813876867294312,
-0.2974788248538971,
0.9509347081184387,
-0.9821265339851379,
1.9451020956039429,
-0.23411054909229279,
-0.15973904728889465,
-1.4283475875854492,
-1.2270604372024536,
0.24581404030323029,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.