text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func RunAppsCreate(c *CmdConfig) error {
specPath, err := c.Doit.GetString(c.NS, doctl.ArgAppSpec)
if err != nil {
return err
}
appSpec, err := apps.ReadAppSpec(os.Stdin, specPath)
if err != nil {
return err
}
upsert, err := c.Doit.GetBool(c.NS, doctl.ArgCommandUpsert)
if err != nil {
return err
}
pr... | [
0.2799054682254791,
-0.5660324096679688,
0.9961725473403931,
0.4955698549747467,
0.12388289719820023,
1.0542784929275513,
0.5062224864959717,
0.19770090281963348,
-0.698714554309845,
0.950192391872406,
-0.030256718397140503,
-0.8453460931777954,
0.06969907879829407,
0.258872389793396,
0.... |
func RunAppsGet(c *CmdConfig) error {
if len(c.Args) < 1 {
return doctl.NewMissingArgsErr(c.NS)
}
id := c.Args[0]
app, err := c.Apps().Get(id)
if err != nil {
return err
}
return c.Display(displayers.Apps{app})
} | [
-0.5635374188423157,
-0.16562291979789734,
0.7746161818504333,
0.023607773706316948,
-0.3588402569293976,
0.541404128074646,
0.1339971125125885,
-0.3672310709953308,
-0.677314817905426,
0.583596408367157,
0.5328398942947388,
0.4512641131877899,
-0.26199573278427124,
0.6536081433296204,
0... |
func RunAppsList(c *CmdConfig) error {
withProjects, err := c.Doit.GetBool(c.NS, doctl.ArgAppWithProjects)
if err != nil {
return err
}
apps, err := c.Apps().List(withProjects)
if err != nil {
return err
}
return c.Display(displayers.Apps(apps))
} | [
-0.3236484229564667,
-0.41289982199668884,
0.5337111949920654,
0.3091098368167877,
-0.6445375680923462,
0.5185550451278687,
0.1784447878599167,
0.09796642512083054,
0.04014123976230621,
0.8119333386421204,
-0.08759164810180664,
0.12920022010803223,
0.1745004653930664,
0.7087500691413879,
... |
func RunAppsUpdate(c *CmdConfig) error {
if len(c.Args) < 1 {
return doctl.NewMissingArgsErr(c.NS)
}
id := c.Args[0]
specPath, err := c.Doit.GetString(c.NS, doctl.ArgAppSpec)
if err != nil {
return err
}
appSpec, err := apps.ReadAppSpec(os.Stdin, specPath)
if err != nil {
return err
}
app, err := c.A... | [
-0.27283456921577454,
-1.0597059726715088,
0.7404311299324036,
-0.27028700709342957,
-0.7685354351997375,
0.8041679263114929,
0.07973527163267136,
0.2802485525608063,
-0.2264627069234848,
1.4018930196762085,
0.21384188532829285,
-0.0855221152305603,
0.041120849549770355,
0.0298956558108329... |
func RunAppsDelete(c *CmdConfig) error {
if len(c.Args) < 1 {
return doctl.NewMissingArgsErr(c.NS)
}
id := c.Args[0]
force, err := c.Doit.GetBool(c.NS, doctl.ArgForce)
if err != nil {
return err
}
if !force && AskForConfirmDelete("App", 1) != nil {
return errOperationAborted
}
err = c.Apps().Delete(id... | [
0.15010331571102142,
-0.2582669258117676,
0.7625454068183899,
0.5255546569824219,
0.1067742258310318,
1.207899570465088,
0.4649946391582489,
-0.25053703784942627,
0.05212802812457085,
0.4695841372013092,
0.3391929566860199,
0.14602047204971313,
-0.3981809616088867,
0.54062819480896,
0.20... |
func RunAppsCreateDeployment(c *CmdConfig) error {
if len(c.Args) < 1 {
return doctl.NewMissingArgsErr(c.NS)
}
appID := c.Args[0]
forceRebuild, err := c.Doit.GetBool(c.NS, doctl.ArgAppForceRebuild)
if err != nil {
return err
}
wait, err := c.Doit.GetBool(c.NS, doctl.ArgCommandWait)
if err != nil {
return... | [
0.09777069091796875,
-0.1887824982404709,
0.6251309514045715,
0.28140750527381897,
0.2592189610004425,
0.5464857816696167,
0.3515705466270447,
-0.10189610719680786,
0.12017522752285004,
1.2411764860153198,
0.3343820571899414,
-0.24910196661949158,
0.20698554813861847,
0.5602347254753113,
... |
func RunAppsGetDeployment(c *CmdConfig) error {
if len(c.Args) < 2 {
return doctl.NewMissingArgsErr(c.NS)
}
appID := c.Args[0]
deploymentID := c.Args[1]
deployment, err := c.Apps().GetDeployment(appID, deploymentID)
if err != nil {
return err
}
return c.Display(displayers.Deployments{deployment})
} | [
-0.11410132050514221,
-0.6221286058425903,
0.5945366621017456,
0.23303677141666412,
0.02721547894179821,
0.4156933128833771,
0.018978305160999298,
0.08267974853515625,
-0.5225377678871155,
1.395400881767273,
0.9456231594085693,
0.5409432053565979,
0.07282508164644241,
0.6144064664840698,
... |
func RunAppsListDeployments(c *CmdConfig) error {
if len(c.Args) < 1 {
return doctl.NewMissingArgsErr(c.NS)
}
appID := c.Args[0]
deployments, err := c.Apps().ListDeployments(appID)
if err != nil {
return err
}
return c.Display(displayers.Deployments(deployments))
} | [
-0.26808708906173706,
-0.4440287947654724,
0.42260512709617615,
0.00977939274162054,
-0.41512471437454224,
0.4515008330345154,
0.22771231830120087,
0.1412586122751236,
0.6157408952713013,
1.1660346984863281,
0.1983657032251358,
0.10234661400318146,
0.40704602003097534,
1.078297734260559,
... |
func RunAppsGetLogs(c *CmdConfig) error {
if len(c.Args) < 1 {
return doctl.NewMissingArgsErr(c.NS)
}
appID := c.Args[0]
var component string
if len(c.Args) >= 2 {
component = c.Args[1]
}
deploymentID, err := c.Doit.GetString(c.NS, doctl.ArgAppDeployment)
if err != nil {
return err
}
if deploymentID ==... | [
0.13100889325141907,
-0.6127580404281616,
0.8864707350730896,
-0.3423146903514862,
0.07897104322910309,
0.6179032921791077,
-0.23224490880966187,
-0.47413626313209534,
-0.19795344769954681,
0.9478210806846619,
0.2298780083656311,
1.1360726356506348,
0.056059494614601135,
0.5670223832130432... |
func RunAppsPropose(c *CmdConfig) error {
appID, err := c.Doit.GetString(c.NS, doctl.ArgApp)
if err != nil {
return err
}
specPath, err := c.Doit.GetString(c.NS, doctl.ArgAppSpec)
if err != nil {
return err
}
appSpec, err := apps.ReadAppSpec(os.Stdin, specPath)
if err != nil {
return err
}
res, err :... | [
-0.26676008105278015,
-0.3337140381336212,
0.7134156227111816,
0.1965116262435913,
-0.032024215906858444,
0.2447611689567566,
0.06078336760401726,
0.3271946609020233,
-0.317325621843338,
1.0109575986862183,
0.6732985377311707,
-0.49675142765045166,
-0.23860739171504974,
0.5015833973884583,... |
func RunAppsSpecGet(c *CmdConfig) error {
if len(c.Args) < 1 {
return doctl.NewMissingArgsErr(c.NS)
}
appID := c.Args[0]
deploymentID, err := c.Doit.GetString(c.NS, doctl.ArgAppDeployment)
if err != nil {
return err
}
format, err := c.Doit.GetString(c.NS, doctl.ArgFormat)
if err != nil {
return err
}
... | [
-0.02304653264582157,
-0.698199987411499,
0.6645006537437439,
-0.5135964155197144,
-0.2400882989168167,
0.05507513880729675,
-0.3858369290828705,
0.10653891414403915,
-0.177774578332901,
0.7589079141616821,
1.0375986099243164,
0.9528539180755615,
0.5423281192779541,
0.3312380015850067,
0... |
func RunAppsSpecValidate(c *CmdConfig) error {
if len(c.Args) < 1 {
return doctl.NewMissingArgsErr(c.NS)
}
specPath := c.Args[0]
appSpec, err := apps.ReadAppSpec(os.Stdin, specPath)
if err != nil {
return err
}
schemaOnly, err := c.Doit.GetBool(c.NS, doctl.ArgSchemaOnly)
if err != nil {
return err
}
... | [
0.2922867238521576,
-0.26668673753738403,
0.811677873134613,
0.07000420242547989,
-0.16173776984214783,
0.7953280806541443,
0.4412475824356079,
0.6474998593330383,
-0.38901370763778687,
0.8791344165802002,
0.7161861658096313,
0.6401681303977966,
0.4949677288532257,
0.20760367810726166,
0... |
func RunAppsListRegions(c *CmdConfig) error {
regions, err := c.Apps().ListRegions()
if err != nil {
return err
}
return c.Display(displayers.AppRegions(regions))
} | [
0.11029201000928879,
-0.7253479957580566,
0.4122309386730194,
-0.18722259998321533,
-0.5718948841094971,
0.07799999415874481,
-0.3379738926887512,
0.08176452666521072,
0.1476576328277588,
-0.02291315235197544,
0.5306696891784668,
0.9440938234329224,
0.4162442982196808,
0.6740953922271729,
... |
func RunAppsTierList(c *CmdConfig) error {
tiers, err := c.Apps().ListTiers()
if err != nil {
return err
}
return c.Display(displayers.AppTiers(tiers))
} | [
0.19617047905921936,
-0.8700068593025208,
0.447019100189209,
0.08611053228378296,
-0.18144455552101135,
0.31174397468566895,
-0.0489363819360733,
0.6684464812278748,
-0.6247114539146423,
0.7657956480979919,
-0.17395122349262238,
1.2261697053909302,
0.22077536582946777,
0.8199489712715149,
... |
func RunAppsTierGet(c *CmdConfig) error {
if len(c.Args) < 1 {
return doctl.NewMissingArgsErr(c.NS)
}
slug := c.Args[0]
tier, err := c.Apps().GetTier(slug)
if err != nil {
return err
}
return c.Display(displayers.AppTiers([]*godo.AppTier{tier}))
} | [
-0.47069430351257324,
-0.9070918560028076,
0.48171061277389526,
-0.3475976884365082,
-0.2992214262485504,
-0.09497446566820145,
-0.11142189055681229,
-0.137057363986969,
-0.8559209704399109,
0.05107385665178299,
0.093972347676754,
0.8989046216011047,
-0.6393021941184998,
0.1786753088235855... |
func RunAppsTierInstanceSizeList(c *CmdConfig) error {
instanceSizes, err := c.Apps().ListInstanceSizes()
if err != nil {
return err
}
return c.Display(displayers.AppInstanceSizes(instanceSizes))
} | [
-0.2943696975708008,
-0.06252206861972809,
0.3985990285873413,
-0.29518890380859375,
-0.4045466184616089,
0.44147077202796936,
0.4515673816204071,
0.7547682523727417,
-0.2758108377456665,
1.0716434717178345,
-0.8679097294807434,
0.618468701839447,
-0.510460615158081,
1.1960163116455078,
... |
func RunAppsTierInstanceSizeGet(c *CmdConfig) error {
if len(c.Args) < 1 {
return doctl.NewMissingArgsErr(c.NS)
}
slug := c.Args[0]
instanceSize, err := c.Apps().GetInstanceSize(slug)
if err != nil {
return err
}
return c.Display(displayers.AppInstanceSizes([]*godo.AppInstanceSize{instanceSize}))
} | [
-0.43673256039619446,
-0.25100088119506836,
0.4961659014225006,
-0.8154975771903992,
-0.6997801065444946,
0.0745251253247261,
0.311441034078598,
0.2081640511751175,
-0.6513600945472717,
0.30285683274269104,
-0.30080100893974304,
0.927738606929779,
-0.980158269405365,
0.5919024348258972,
... |
func RunAppListAlerts(c *CmdConfig) error {
if len(c.Args) < 1 {
return doctl.NewMissingArgsErr(c.NS)
}
appID := c.Args[0]
alerts, err := c.Apps().ListAlerts(appID)
if err != nil {
return err
}
return c.Display(displayers.AppAlerts(alerts))
} | [
0.07622911781072617,
-1.1201692819595337,
0.5136529207229614,
0.26616621017456055,
-0.21669510006904602,
0.7790911793708801,
-0.09142787754535675,
-0.22419393062591553,
0.4168786108493805,
0.5313726663589478,
0.43335065245628357,
0.9867792725563049,
0.08610448241233826,
1.0779763460159302,... |
func RunAppUpgradeBuildpack(c *CmdConfig) error {
if len(c.Args) < 1 {
return doctl.NewMissingArgsErr(c.NS)
}
appID := c.Args[0]
buildpack, err := c.Doit.GetString(c.NS, doctl.ArgBuildpack)
if err != nil {
return err
}
majorVersion, err := c.Doit.GetInt(c.NS, doctl.ArgMajorVersion)
if err != nil {
return... | [
-0.6931537389755249,
-0.609633207321167,
0.7369163036346436,
-0.11845507472753525,
-0.34779587388038635,
0.3064889907836914,
0.5492111444473267,
0.34520357847213745,
0.3026174008846283,
0.4671880304813385,
-0.5649051070213318,
0.3039572834968567,
0.1986047774553299,
0.18112263083457947,
... |
func (e *Engine) startBrd() {
ticker := time.NewTicker(broadcastInterval)
for {
select {
case <-e.brdStop:
ticker.Stop()
return
case <-ticker.C:
e.broadcastChanges()
}
}
} | [
0.3056390583515167,
-0.0213780514895916,
0.6835645437240601,
-0.09854114055633545,
0.19009608030319214,
0.6035838723182678,
-0.04342087358236313,
-0.15042753517627716,
-0.5208759903907776,
-0.6162516474723816,
0.9451031684875488,
1.5611246824264526,
-0.8417648673057556,
1.0013654232025146,... |
func (h HealthHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
unhealthy := []string{}
for name, service := range h.services {
if !service.Healthy() {
unhealthy = append(unhealthy, name)
}
}
sort.Strings(unhealthy)
if len(unhealthy) == 0 {
fmt.Fprintln(w, "HEALTHY")
return
}
w.WriteHead... | [
-0.49397602677345276,
-0.5611210465431213,
0.6416734457015991,
-0.40908941626548767,
0.15704165399074554,
0.9165799617767334,
-0.2654258906841278,
-0.31145158410072327,
-1.146614909172058,
0.6068825721740723,
0.43746039271354675,
0.005529825109988451,
-0.18525150418281555,
0.80364686250686... |
func (s *Server) Run(ctx context.Context) error {
h := HealthHandler{
services: map[string]Healthier{
"ec2": s.collectors.EC2,
"asg": s.collectors.ASG,
"spot": s.collectors.Spot,
"nodes": s.collectors.Node,
"pods": s.collectors.Pod,
"mainloop": s.mainloop,
},
}
router := httprouter.New(... | [
-0.3169049918651581,
-0.7755078673362732,
0.8716870546340942,
-0.17107459902763367,
0.3353564441204071,
1.0402745008468628,
0.2536962330341339,
-0.10367817431688309,
-0.06770574301481247,
-0.9214156866073608,
0.0011236484861001372,
0.6119998097419739,
0.23997057974338531,
0.744454324245452... |
func GetAccessToken(req *restful.Request) string {
// Get token from the Authorization header
// format: Authorization: Bearer
token := req.Request.Header.Get("Authorization")
if len(token) > 0 {
return strings.TrimPrefix(token, "Bearer ")
}
return ""
} | [
0.3009200394153595,
-0.4317985773086548,
0.6502768993377686,
0.3515372574329376,
-0.4534395635128021,
-0.06466212868690491,
-0.07650971412658691,
0.4841747283935547,
0.4459148645401001,
0.23120424151420593,
1.4840031862258911,
0.6107128858566284,
0.6140211820602417,
0.15833047032356262,
... |
func Distance(a, b string) (int, error) {
counter := 0
ar, br := []rune(a), []rune(b)
if len(ar) != len(br) {
return 0, errors.New("The length of the strands are different")
}
for i := range ar {
if ar[i] != br[i] {
counter++
}
}
return counter, nil
} | [
0.6770162582397461,
-0.2830437123775482,
0.6868373155593872,
0.018425414338707924,
-0.5749489068984985,
0.6833046674728394,
0.6294471025466919,
0.13181178271770477,
0.5424522757530212,
1.0721590518951416,
0.41622820496559143,
0.16681884229183197,
-0.7562091946601868,
0.23518425226211548,
... |
func NewWallet(seed []byte) (w *Wallet, err error) {
w = newWallet(seed, false)
return
} | [
-0.03940392658114433,
-0.02917470596730709,
0.1174105703830719,
1.073733925819397,
-0.987602710723877,
-0.3606010377407074,
0.17407505214214325,
-0.40723687410354614,
0.27259498834609985,
-0.40205731987953186,
-0.4011227488517761,
0.4342344105243683,
-0.4423453211784363,
1.1376206874847412... |
func NewBananoWallet(seed []byte) (w *Wallet, err error) {
w = newWallet(seed, true)
return
} | [
0.4516056776046753,
0.019156401976943016,
0.3397012948989868,
0.2616916596889496,
-1.2979897260665894,
-0.37655770778656006,
-0.07088568806648254,
0.3276268243789673,
0.21144531667232513,
0.1149342954158783,
-1.0375233888626099,
0.7429887056350708,
-0.688503623008728,
0.9173682928085327,
... |
func NewBip39Wallet(mnemonic, password string) (w *Wallet, err error) {
seed, err := newBip39Seed(mnemonic, password)
if err != nil {
return
}
w = newWallet(seed, false)
w.isBip39 = true
return
} | [
0.5197187066078186,
-0.1366245001554489,
0.26159608364105225,
0.05678010359406471,
-0.2536477744579315,
0.23270544409751892,
-0.5712811350822449,
0.6679429411888123,
-0.1169145330786705,
0.20173314213752747,
-0.36800986528396606,
0.25174447894096375,
-0.49684783816337585,
0.310832649469375... |
func NewBip39BananoWallet(mnemonic, password string) (w *Wallet, err error) {
seed, err := newBip39Seed(mnemonic, password)
if err != nil {
return
}
w = newWallet(seed, true)
w.isBip39 = true
return
} | [
0.7028450965881348,
0.14521066844463348,
0.4839896559715271,
-0.12012939900159836,
-0.4600885510444641,
0.03154235705733299,
-0.37519723176956177,
0.8615938425064087,
0.1467798352241516,
0.6598258018493652,
-0.7293389439582825,
0.7873011231422424,
-0.47289910912513733,
0.045980047434568405... |
func NewLedgerWallet() (w *Wallet, err error) {
w = newWallet(nil, false)
w.impl = ledgerImpl{}
return
} | [
-0.08506178855895996,
-0.25404468178749084,
0.2078733891248703,
-0.1836526244878769,
-0.5322520732879639,
-0.5505945682525635,
-0.19853417575359344,
-0.336169958114624,
-0.44075238704681396,
-1.003214955329895,
-0.8616349697113037,
1.1288235187530518,
-0.2889658808708191,
1.817990303039550... |
func (w *Wallet) ScanForAccounts() (err error) {
accounts := make([]string, 10)
for i := range accounts {
a, err := w.NewAccount(nil)
if err != nil {
return err
}
accounts[i] = a.Address()
}
balances, err := w.RPC.AccountsBalances(accounts)
if err != nil {
return
}
frontiers, err := w.RPC.AccountsFr... | [
-0.16293391585350037,
0.19481632113456726,
0.7198861837387085,
-0.26618173718452454,
-0.3586864769458771,
-0.8063104748725891,
1.030964970588684,
-0.6478456854820251,
0.5906216502189636,
-0.40063712000846863,
0.7545378804206848,
-0.709380567073822,
-0.6978082060813904,
0.6335058808326721,
... |
func (w *Wallet) NewAccount(index *uint32) (a *Account, err error) {
index2 := w.nextIndex
if index != nil {
index2 = *index
}
a = &Account{w: w, index: index2}
if err = w.impl.deriveAccount(a); err != nil {
return
}
pubkeyToAddress := util.PubkeyToAddress
if w.isBanano {
pubkeyToAddress = util.PubkeyToBa... | [
-0.14518551528453827,
0.23148198425769806,
0.5703163743019104,
0.16170208156108856,
-0.35717666149139404,
-0.577325165271759,
1.080026626586914,
0.23234108090400696,
1.6192365884780884,
0.35467684268951416,
-0.001418498926796019,
0.6070136427879333,
-0.4954293966293335,
0.03335898369550705... |
func (w *Wallet) GetAccount(address string) *Account {
return w.accounts[address]
} | [
0.6251728534698486,
-0.3977157175540924,
0.017795607447624207,
0.33032160997390747,
-0.12139385938644409,
-0.5117506980895996,
0.5715714693069458,
0.11106590181589127,
1.6840970516204834,
0.36959028244018555,
0.6492301225662231,
1.2692601680755615,
0.09896256774663925,
-0.17229115962982178... |
func (w *Wallet) GetAccounts() (accounts []*Account) {
accounts = make([]*Account, 0, len(w.accounts))
for _, account := range w.accounts {
accounts = append(accounts, account)
}
return
} | [
0.0005515416851267219,
-0.38126376271247864,
0.33297914266586304,
0.46559080481529236,
0.582045316696167,
-0.2923523485660553,
0.13116392493247986,
-0.8237817287445068,
1.1801490783691406,
-0.5244513750076294,
0.7086015939712524,
0.4661064147949219,
-0.7633500099182129,
0.3391229808330536,... |
func (w *Wallet) ReceivePendings(threshold *big.Int) (err error) {
accounts := make([]string, 0, len(w.accounts))
for address := range w.accounts {
accounts = append(accounts, address)
}
pendings, err := w.RPC.AccountsPending(accounts, -1, &rpc.RawAmount{Int: *threshold})
if err != nil {
return
}
for account... | [
-0.46435239911079407,
-0.04263977333903313,
0.7344686388969421,
-0.60140061378479,
-0.38306963443756104,
-0.04957553371787071,
-0.45200732350349426,
0.3031560182571411,
0.028213270008563995,
0.017909804359078407,
0.2569046914577484,
-0.4110809564590454,
-0.7918498516082764,
0.7703256607055... |
func NewTaskCreateRequest(flux string) *TaskCreateRequest {
this := TaskCreateRequest{}
this.Flux = flux
return &this
} | [
-0.2959263324737549,
0.21504738926887512,
0.2840522229671478,
0.8959557414054871,
-0.512498140335083,
-0.28049954771995544,
0.9648663401603699,
0.006287747528403997,
-0.7989623546600342,
-0.46049219369888306,
-0.5365047454833984,
0.15855959057807922,
0.487131267786026,
0.5737811923027039,
... |
func NewTaskCreateRequestWithDefaults() *TaskCreateRequest {
this := TaskCreateRequest{}
return &this
} | [
-0.42199352383613586,
0.3920636773109436,
-0.052140574902296066,
1.174447774887085,
0.22512288391590118,
-0.5070002675056458,
0.06708770245313644,
-0.3899160921573639,
-0.744411826133728,
-0.43499934673309326,
-0.4077472388744354,
-1.3474690914154053,
0.35907766222953796,
0.948484241962432... |
func (o *TaskCreateRequest) GetOrgID() string {
if o == nil || o.OrgID == nil {
var ret string
return ret
}
return *o.OrgID
} | [
1.1468663215637207,
0.604180634021759,
0.20157644152641296,
1.4382723569869995,
0.2762124836444855,
0.6046460866928101,
0.5056368112564087,
-0.155435249209404,
0.3123500645160675,
-0.28073206543922424,
0.16424120962619781,
-0.704004168510437,
-0.5377989411354065,
0.6502773761749268,
0.32... |
func (o *TaskCreateRequest) GetOrgIDOk() (*string, bool) {
if o == nil || o.OrgID == nil {
return nil, false
}
return o.OrgID, true
} | [
0.12531346082687378,
0.6698601841926575,
0.3491334021091461,
0.7132956385612488,
1.1912258863449097,
0.9954367280006409,
0.6545157432556152,
0.21214863657951355,
-0.27077826857566833,
-0.1372040957212448,
-0.7691593766212463,
-0.11013337224721909,
-0.3103089928627014,
0.2604244649410248,
... |
func (o *TaskCreateRequest) HasOrgID() bool {
if o != nil && o.OrgID != nil {
return true
}
return false
} | [
1.5437604188919067,
0.7514936327934265,
0.332009881734848,
0.714313268661499,
0.5655363202095032,
0.19932693243026733,
-0.21980588138103485,
0.7997119426727295,
-0.39075133204460144,
-0.18039317429065704,
-0.3665264844894409,
-0.5952261686325073,
-0.09147805720567703,
0.4613134264945984,
... |
func (o *TaskCreateRequest) SetOrgID(v string) {
o.OrgID = &v
} | [
1.3640128374099731,
0.24523954093456268,
-0.08490098267793655,
0.6074770092964172,
-0.6040924191474915,
0.6935760974884033,
-0.33014586567878723,
-0.48902732133865356,
-0.6526644825935364,
0.263504296541214,
-0.029941415414214134,
0.9880009293556213,
-0.16349919140338898,
-0.07791481912136... |
func (o *TaskCreateRequest) GetOrg() string {
if o == nil || o.Org == nil {
var ret string
return ret
}
return *o.Org
} | [
0.5208401679992676,
0.9480912089347839,
-0.008769226260483265,
1.090950608253479,
-0.48451754450798035,
0.31694450974464417,
1.2034507989883423,
0.3028932511806488,
-0.25985005497932434,
-0.5333923697471619,
-0.32653722167015076,
-1.109790563583374,
-0.049238234758377075,
0.314261764287948... |
func (o *TaskCreateRequest) GetOrgOk() (*string, bool) {
if o == nil || o.Org == nil {
return nil, false
}
return o.Org, true
} | [
0.08973407745361328,
0.7036076784133911,
0.19361025094985962,
0.40585795044898987,
0.3762265145778656,
0.5090909600257874,
0.6764782667160034,
0.08773169666528702,
-0.6594042778015137,
0.5531198382377625,
-0.7649049758911133,
0.08165856450796127,
-0.06843459606170654,
0.08233121782541275,
... |
func (o *TaskCreateRequest) HasOrg() bool {
if o != nil && o.Org != nil {
return true
}
return false
} | [
0.7973453402519226,
0.8980984091758728,
0.09140896797180176,
0.6778673529624939,
0.2281470149755478,
0.0506269633769989,
0.13279418647289276,
1.4108918905258179,
-0.564903199672699,
-0.5221626162528992,
-0.8461562395095825,
-1.1816176176071167,
0.3740471601486206,
-0.07458427548408508,
-... |
func (o *TaskCreateRequest) SetOrg(v string) {
o.Org = &v
} | [
0.5167846083641052,
0.6932108402252197,
-0.6024122834205627,
0.48705896735191345,
-1.2726606130599976,
0.2967292368412018,
-0.11732987314462662,
-0.19526579976081848,
-1.0055549144744873,
0.26348209381103516,
-0.555348813533783,
0.49636563658714294,
0.31316015124320984,
-0.4746076762676239... |
func (o *TaskCreateRequest) GetStatus() TaskStatusType {
if o == nil || o.Status == nil {
var ret TaskStatusType
return ret
}
return *o.Status
} | [
0.31201913952827454,
0.6537909507751465,
0.09685944765806198,
1.2059180736541748,
0.023301340639591217,
0.32724857330322266,
1.1457980871200562,
0.0942651778459549,
0.894019603729248,
-0.8715967535972595,
-0.9081264138221741,
-0.8393371105194092,
-0.33640387654304504,
0.8529796600341797,
... |
func (o *TaskCreateRequest) GetStatusOk() (*TaskStatusType, bool) {
if o == nil || o.Status == nil {
return nil, false
}
return o.Status, true
} | [
-0.7362129092216492,
1.049146294593811,
0.23399262130260468,
1.2186287641525269,
0.12609612941741943,
-0.024944698438048363,
0.8565353751182556,
1.0560065507888794,
-0.10538111627101898,
-0.25308528542518616,
-1.4384158849716187,
-0.0773344486951828,
0.7210596799850464,
0.131537064909935,
... |
func (o *TaskCreateRequest) HasStatus() bool {
if o != nil && o.Status != nil {
return true
}
return false
} | [
0.358147531747818,
-0.09373115748167038,
0.06026380509138107,
0.6448022723197937,
0.4526878893375397,
0.09998302906751633,
-0.17603041231632233,
1.176176905632019,
0.41984620690345764,
-1.055808663368225,
-1.2682076692581177,
-0.8535961508750916,
0.2508133053779602,
0.22690723836421967,
... |
func (o *TaskCreateRequest) SetStatus(v TaskStatusType) {
o.Status = &v
} | [
-0.15552383661270142,
0.35333356261253357,
-0.43256184458732605,
0.9231052994728088,
-0.7121908068656921,
1.0236862897872925,
-0.36654314398765564,
-0.5338992476463318,
-0.22273573279380798,
0.15078583359718323,
-0.83251953125,
0.5693451166152954,
0.26944807171821594,
0.7782846093177795,
... |
func (o *TaskCreateRequest) GetFlux() string {
if o == nil {
var ret string
return ret
}
return o.Flux
} | [
0.4278009235858917,
0.07182344049215317,
-0.208341583609581,
0.9115073680877686,
-0.09934049099683762,
0.3157200813293457,
1.0255916118621826,
0.05245758593082428,
0.6655325889587402,
-1.6149024963378906,
-0.37012606859207153,
0.39525797963142395,
-0.4472728669643402,
-0.038411978632211685... |
func (o *TaskCreateRequest) GetFluxOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Flux, true
} | [
0.2274145931005478,
0.05725040286779404,
0.5648280382156372,
0.9704992175102234,
-0.35107100009918213,
-0.11381906270980835,
0.6899546980857849,
0.8246748447418213,
0.11792720854282379,
-0.17028173804283142,
-1.4569145441055298,
-0.08662645518779755,
0.30489715933799744,
0.7919336557388306... |
func (o *TaskCreateRequest) SetFlux(v string) {
o.Flux = v
} | [
-0.0174453966319561,
0.033951286226511,
-0.401832640171051,
0.4317270517349243,
-0.7948412895202637,
0.05223110690712929,
0.5901004076004028,
0.3782760798931122,
-0.40735602378845215,
-1.0751502513885498,
-0.8871142268180847,
1.0519407987594604,
-0.04492904990911484,
0.4201737940311432,
... |
func (o *TaskCreateRequest) GetDescription() string {
if o == nil || o.Description == nil {
var ret string
return ret
}
return *o.Description
} | [
0.8036673069000244,
0.3869993984699249,
0.16623300313949585,
1.0368194580078125,
0.14577467739582062,
-0.24274267256259918,
0.6666408181190491,
-0.49990060925483704,
0.9643450975418091,
-0.06640399247407913,
0.10663305968046188,
-1.6100226640701294,
-0.5257202386856079,
1.0738312005996704,... |
func (o *TaskCreateRequest) GetDescriptionOk() (*string, bool) {
if o == nil || o.Description == nil {
return nil, false
}
return o.Description, true
} | [
0.15916845202445984,
0.39766621589660645,
0.32385385036468506,
0.6202549934387207,
-0.06679469347000122,
0.7587918043136597,
0.6202161908149719,
0.5970444679260254,
-0.13673262298107147,
0.9046590328216553,
-0.18655197322368622,
-1.0804598331451416,
0.34079498052597046,
0.921541154384613,
... |
func (o *TaskCreateRequest) HasDescription() bool {
if o != nil && o.Description != nil {
return true
}
return false
} | [
0.4770200550556183,
0.5386939644813538,
0.04177224263548851,
0.41806265711784363,
0.5977561473846436,
-0.3258623480796814,
0.16306589543819427,
0.4946179687976837,
0.36553552746772766,
-0.13716372847557068,
-0.3418828845024109,
-0.9862493872642517,
-0.03125864267349243,
0.9435127973556519,... |
func (o *TaskCreateRequest) SetDescription(v string) {
o.Description = &v
} | [
0.2650729715824127,
0.24546772241592407,
-0.41659003496170044,
0.4422018229961395,
-0.5664309859275818,
0.1770874708890915,
-0.02498689293861389,
-0.8831073045730591,
-0.3572314977645874,
0.4463074207305908,
0.4371420443058014,
0.8893333673477173,
0.06099596619606018,
0.1362944394350052,
... |
func GetMainFunc(mod *compile.Module, name string) (funcIndex uint32, sig wa.FuncType, err error) {
funcIndex, sig, found := mod.ExportFunc(name)
if !found {
err = module.Errorf("export function %q not found", name)
return
}
switch sig.Result {
case wa.Void, wa.I32:
// ok
return
default:
err = module.... | [
-0.020867452025413513,
-0.005875356961041689,
0.6792594790458679,
0.355366975069046,
-0.501510739326477,
-0.5594711303710938,
0.8252855539321899,
-0.18907563388347626,
1.0202075242996216,
0.5205836892127991,
0.24329788982868195,
0.8083072304725647,
-0.6288781762123108,
0.11589935421943665,... |
func Debugw(msg string, keyValues KV) {
debugLogger.DebugWithFields(msg, keyValues)
} | [
-0.16099999845027924,
0.6843274235725403,
0.42512136697769165,
-0.07904006540775299,
-0.4922756552696228,
0.4199797809123993,
-0.5628538131713867,
-0.3790997862815857,
-0.46079739928245544,
-0.4596889615058899,
-0.16999275982379913,
0.35526442527770996,
0.6664714813232422,
1.59848523139953... |
func Infow(msg string, keyValues KV) {
infoLogger.InfoWithFields(msg, keyValues)
} | [
0.09941630065441132,
0.4420129656791687,
0.4879555404186249,
0.12180478870868683,
-0.3948083817958832,
0.6743448376655579,
-0.7077041864395142,
0.024920284748077393,
-0.9582901000976562,
-0.18763038516044617,
-0.1528957188129425,
0.5567784905433655,
1.0020779371261597,
1.4041593074798584,
... |
func Warnw(msg string, keyValues KV) {
warnLogger.WarnWithFields(msg, keyValues)
} | [
-0.010603969916701317,
0.9438292384147644,
0.39059314131736755,
-0.1460271030664444,
-0.9101684093475342,
0.05357974395155907,
-1.0406800508499146,
-0.19230946898460388,
-1.1487505435943604,
-0.04277604818344116,
0.12199220806360245,
0.8991612792015076,
1.1064448356628418,
0.86536467075347... |
func Fatalw(msg string, keyValues KV) {
fatalLogger.FatalWithFields(msg, keyValues)
} | [
0.19109787046909332,
0.8058320879936218,
0.34460633993148804,
0.4807492792606354,
-0.5975964069366455,
0.5444148182868958,
-1.0574281215667725,
0.20114460587501526,
-0.25604456663131714,
-0.37758442759513855,
0.34718185663223267,
0.1417728215456009,
0.9394344091415405,
1.4826891422271729,
... |
func SetConfig(config *Config) error {
var (
newDebugLogger logger.Logger
newLogger logger.Logger
err error
debugLoggerConfig = logger.Config{Level: logger.DebugLevel}
loggerConfig = logger.Config{Level: logger.InfoLevel}
engine = Zerolog
)
if config != nil {
e... | [
0.1544998735189438,
-0.5410130620002747,
0.9934598207473755,
0.336325079202652,
-0.3466859459877014,
-0.6419250965118408,
-0.47454163432121277,
0.12758880853652954,
0.44518136978149414,
-0.3274296224117279,
-0.39695310592651367,
0.40506401658058167,
0.24878326058387756,
1.527116298675537,
... |
func (s *Service) GetTask(taskKey string) (*Task, error) {
for _, task := range s.Tasks {
if task.Key == taskKey {
task.serviceName = s.Name
return task, nil
}
}
return nil, &TaskNotFoundError{
TaskKey: taskKey,
ServiceName: s.Name,
}
} | [
0.02361583709716797,
0.501780092716217,
0.20115235447883606,
0.28739479184150696,
-0.28869056701660156,
-0.31886571645736694,
0.1359514445066452,
-0.3915492594242096,
-0.1710013747215271,
0.8139628767967224,
-0.1548747718334198,
1.0682536363601685,
0.48804646730422974,
0.486752450466156,
... |
func (t *Task) GetInputParameter(inputKey string) (*Parameter, error) {
for _, input := range t.Inputs {
if input.Key == inputKey {
return input, nil
}
}
return nil, &TaskInputNotFoundError{
TaskKey: t.Key,
TaskInputKey: inputKey,
ServiceName: t.serviceName,
}
} | [
-0.9921043515205383,
0.16336119174957275,
0.3258415162563324,
-0.4762325882911682,
-0.8575578331947327,
0.2533404231071472,
0.976794421672821,
-0.680823564529419,
-0.2923569083213806,
1.1444032192230225,
0.012616701424121857,
0.49917012453079224,
-0.6595758199691772,
0.732122540473938,
-... |
func (t *Task) ValidateInputs(taskInputs map[string]interface{}) []*ParameterWarning {
return validateParametersSchema(t.Inputs, taskInputs)
} | [
-1.4789503812789917,
-0.06624037772417068,
0.33125510811805725,
0.8173840641975403,
-0.15249751508235931,
0.6300023794174194,
0.3025257885456085,
-0.5133669972419739,
-0.4288729727268219,
0.5857279300689697,
0.6858781576156616,
0.5606177449226379,
-0.48439887166023254,
0.6945107579231262,
... |
func (t *Task) RequireInputs(taskInputs map[string]interface{}) error {
warnings := t.ValidateInputs(taskInputs)
if len(warnings) > 0 {
return &InvalidTaskInputError{
TaskKey: t.Key,
ServiceName: t.serviceName,
Warnings: warnings,
}
}
return nil
} | [
-1.3240176439285278,
0.0887441337108612,
0.38937434554100037,
0.2839171588420868,
-0.7408238649368286,
0.8041276335716248,
0.07908452302217484,
-0.3919144570827484,
-0.5357339978218079,
0.3585563600063324,
0.1606820523738861,
-0.19220776855945587,
-0.7147513031959534,
0.6228153705596924,
... |
func (t *Task) GetOutput(outputKey string) (*Output, error) {
for _, output := range t.Outputs {
if output.Key == outputKey {
output.taskKey = t.Key
output.serviceName = t.serviceName
return output, nil
}
}
return nil, &TaskOutputNotFoundError{
TaskKey: t.Key,
TaskOutputKey: outputKey,
Servi... | [
-0.4855485260486603,
-0.17518194019794464,
0.32972460985183716,
0.3231133818626404,
-0.8449140787124634,
-0.8911262154579163,
0.507971465587616,
-0.6493026614189148,
-0.7333969473838806,
0.7480903267860413,
0.3113462030887604,
0.08160747587680817,
-0.022965235635638237,
0.15413935482501984... |
func (o *Output) ValidateData(outputData map[string]interface{}) []*ParameterWarning {
return validateParametersSchema(o.Data, outputData)
} | [
-1.1411200761795044,
-0.6243447661399841,
0.4795015752315521,
0.763814389705658,
-0.45404052734375,
-0.2821463346481323,
-0.08975765109062195,
-0.8033414483070374,
-0.27003154158592224,
-0.25697869062423706,
0.3145851194858551,
0.3262251019477844,
0.299172967672348,
1.0443857908248901,
-... |
func (o *Output) RequireData(outputData map[string]interface{}) error {
warnings := o.ValidateData(outputData)
if len(warnings) > 0 {
return &InvalidTaskOutputError{
TaskKey: o.taskKey,
TaskOutputKey: o.Key,
ServiceName: o.serviceName,
Warnings: warnings,
}
}
return nil
} | [
-0.8538821339607239,
-0.570573627948761,
0.4958621859550476,
0.31149035692214966,
-1.0506515502929688,
0.463540256023407,
0.3652005195617676,
-0.14447470009326935,
-0.5344999432563782,
-0.1820625513792038,
0.49535709619522095,
-0.4297104775905609,
0.3778867721557617,
0.15730269253253937,
... |
func getRequestBatch(r *http.Request) int64 {
batch, err := strconv.ParseInt(r.Header.Get(X_GOME_BRANCH), 10, 64)
if err != nil {
return int64(model.DEFAULT_BRANCH)
} else {
return batch
}
} | [
-0.679405152797699,
1.0012646913528442,
0.6209043264389038,
1.184247612953186,
0.8516028523445129,
-0.18448133766651154,
-0.5856680870056152,
-0.14530616998672485,
-0.6252287030220032,
-0.7344282269477844,
0.39458179473876953,
0.10951247066259384,
-0.9465884566307068,
-0.10238656401634216,... |
func getRequestEntityType(r *http.Request) string {
return r.Header.Get(X_GOME_TYPE)
} | [
-0.5928565263748169,
-0.2588029205799103,
0.5049409866333008,
0.18473583459854126,
0.825402021408081,
0.3444468379020691,
-0.5893440246582031,
-0.7009541988372803,
-0.2460184097290039,
0.03492983430624008,
0.7597699165344238,
0.20582784712314606,
-0.9376442432403564,
0.5166906118392944,
... |
func getRequestHash(r *http.Request) string {
return r.Header.Get(X_GOME_HASH)
} | [
-0.16747969388961792,
0.5412983894348145,
0.5826879739761353,
1.3265600204467773,
0.012017403729259968,
0.6643477082252502,
-0.9222773909568787,
-0.8325185775756836,
-0.6634593605995178,
-0.03018862195312977,
0.6530824303627014,
0.3807743191719055,
-0.9891263246536255,
-1.0675578117370605,... |
func getRequestContentType(r *http.Request) string {
ct := r.Header.Get("Content-Type")
if ct != "" {
return ct
} else {
return DEFAULT_CONTENT_TYPE
}
} | [
0.28670570254325867,
-0.34045323729515076,
0.7087574005126953,
0.991915225982666,
0.5978080034255981,
-0.6433417797088623,
-0.5304412245750427,
-0.6913700699806213,
-0.23651577532291412,
0.019717277958989143,
0.9402347207069397,
0.08208628743886948,
-0.8231596946716309,
0.16714027523994446... |
func BestPath(g *graphs.Graph, query *data.Query, circleFinder *CircleFinder) *data.Path {
fromVertices := circleFinder.VerticesInCircle(query.From, query.WalkingRadius) // O(V*log(D))
toVertices := circleFinder.VerticesInCircle(query.To, query.WalkingRadius) // O(V*log(D))
bestTime, walkingDistance, drivingDis... | [
-0.1785566657781601,
-0.4350137710571289,
0.3025968372821808,
-0.3833824098110199,
-0.9289696216583252,
0.12763097882270813,
0.46174558997154236,
-0.32300594449043274,
0.3606659471988678,
0.2987838685512543,
0.2868053615093231,
-0.14624054729938507,
-0.22972369194030762,
-0.521265625953674... |
func NewCatalogEntry(ctx *pulumi.Context,
name string, args *CatalogEntryArgs, opts ...pulumi.ResourceOption) (*CatalogEntry, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Address == nil {
return nil, errors.New("invalid value for required argument 'Addres... | [
0.3607802093029022,
0.41286036372184753,
0.24763843417167664,
-0.3372725248336792,
0.1345648318529129,
0.3099387586116791,
-1.1159138679504395,
0.11391132324934006,
-0.15275409817695618,
0.1309782862663269,
-0.3865801692008972,
0.6258227229118347,
0.07136057317256927,
-0.3938857316970825,
... |
func GetCatalogEntry(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *CatalogEntryState, opts ...pulumi.ResourceOption) (*CatalogEntry, error) {
var resource CatalogEntry
err := ctx.ReadResource("consul:index/catalogEntry:CatalogEntry", name, id, state, &resource, opts...)
if err != nil {
return nil, e... | [
0.953150749206543,
-0.021555176004767418,
0.01902260258793831,
-0.11074195802211761,
0.15170057117938995,
0.25913384556770325,
-1.0305256843566895,
-0.07599228620529175,
0.63474440574646,
-0.06277153640985489,
0.41294413805007935,
1.5239752531051636,
0.16446086764335632,
-1.222358822822570... |
func (o CatalogEntryOutput) Address() pulumi.StringOutput {
return o.ApplyT(func(v *CatalogEntry) pulumi.StringOutput { return v.Address }).(pulumi.StringOutput)
} | [
0.4253670573234558,
-0.6830270290374756,
0.38657528162002563,
-0.1496564745903015,
0.3396351635456085,
1.2224830389022827,
-0.021921027451753616,
0.6331662535667419,
0.5937368273735046,
0.22284609079360962,
0.41631877422332764,
1.6393729448318481,
0.41944199800491333,
-1.255434274673462,
... |
func (o CatalogEntryOutput) Datacenter() pulumi.StringOutput {
return o.ApplyT(func(v *CatalogEntry) pulumi.StringOutput { return v.Datacenter }).(pulumi.StringOutput)
} | [
0.6851942539215088,
-0.39712414145469666,
0.23661793768405914,
-0.6169811487197876,
0.5530205368995667,
0.6032482981681824,
-0.050259411334991455,
0.452434241771698,
0.5682592988014221,
0.024968434125185013,
0.09849884361028671,
1.0243630409240723,
1.116801142692566,
-1.0971583127975464,
... |
func (o CatalogEntryOutput) Node() pulumi.StringOutput {
return o.ApplyT(func(v *CatalogEntry) pulumi.StringOutput { return v.Node }).(pulumi.StringOutput)
} | [
0.5235498547554016,
-0.0773899033665657,
0.19243505597114563,
-0.6931644678115845,
0.5040315389633179,
0.7510426044464111,
-0.4637521207332611,
0.7989832758903503,
0.22419944405555725,
0.23000894486904144,
0.29404497146606445,
1.09878408908844,
1.1054459810256958,
-1.611484169960022,
-0.... |
func (o CatalogEntryOutput) Services() CatalogEntryServiceArrayOutput {
return o.ApplyT(func(v *CatalogEntry) CatalogEntryServiceArrayOutput { return v.Services }).(CatalogEntryServiceArrayOutput)
} | [
-0.23294052481651306,
-0.33680856227874756,
0.44059303402900696,
-0.14011496305465698,
0.22305937111377716,
0.3802388310432434,
0.1348840445280075,
-0.6421171426773071,
0.3630601465702057,
-0.2804373800754547,
-0.010779419913887978,
0.7560522556304932,
0.7491746544837952,
-0.02342395670711... |
func (o CatalogEntryOutput) Token() pulumi.StringPtrOutput {
return o.ApplyT(func(v *CatalogEntry) pulumi.StringPtrOutput { return v.Token }).(pulumi.StringPtrOutput)
} | [
0.6248293519020081,
-0.3645731210708618,
0.07385413348674774,
-0.3191720247268677,
0.8493488430976868,
0.6843286156654358,
-0.02763591706752777,
1.3184864521026611,
0.2808663547039032,
-0.48436620831489563,
0.05457480624318123,
1.2805131673812866,
1.1532217264175415,
-1.6118733882904053,
... |
func Max(a, b int) int {
if a > b {
return a
}
return b
} | [
-0.06727436929941177,
0.670540988445282,
0.3449091613292694,
0.3648669123649597,
-0.34648004174232483,
0.20483596622943878,
-1.1642109155654907,
-0.6604490280151367,
-0.6736398339271545,
0.24308907985687256,
0.4477981925010681,
1.3510093688964844,
-0.0016065402887761593,
-0.077071644365787... |
func NewZramInfoTracker(metricPrefix string) (*ZramInfoTracker, error) {
hasZram := false
if fi, err := os.Stat(zramDevPath); err == nil {
m := fi.Mode() &^ 07777
hasZram = m == os.ModeDevice
}
return &ZramInfoTracker{
prefix: metricPrefix,
hasZram: hasZram,
}, nil
} | [
0.3843393325805664,
-0.23078149557113647,
0.36729124188423157,
0.464759886264801,
-0.9315263032913208,
0.1898442506790161,
0.9674164056777954,
-0.09234458953142166,
-0.3338856101036072,
-0.33298102021217346,
-0.025558093562722206,
0.09290630370378494,
-0.740475594997406,
0.619331419467926,... |
func getMmStat(ctx context.Context) ([]float64, error) {
out, err := testexec.CommandContext(ctx,
"cat", zramMmStatPath).Output(testexec.DumpLogOnError)
if err != nil {
return nil, errors.Wrap(err, "failed to dump zram mm_stat")
}
statsRaw := strings.Fields(string(out))
numFields := len(statsRaw)
stats := ma... | [
0.3416202962398529,
0.4689016342163086,
0.4933880865573883,
-0.1796751469373703,
0.05449684336781502,
-0.5694867968559265,
-0.16598545014858246,
-0.6580893397331238,
0.5562472343444824,
0.14947856962680817,
-0.1039310023188591,
0.38054579496383667,
-1.2652010917663574,
0.45125722885131836,... |
func (t *ZramInfoTracker) Start(ctx context.Context) error {
if !t.hasZram {
return nil
}
// Reset "mem_used_max" counter.
if err := testexec.CommandContext(ctx,
"sh", "-c", fmt.Sprintf("echo 0 > %q", zramResetMemUsedMaxPath)).Run(testexec.DumpLogOnError); err != nil {
return errors.Wrap(err, "failed to rese... | [
0.7760768532752991,
-0.11008786410093307,
0.6071444153785706,
0.29986250400543213,
0.0875575989484787,
-0.19045166671276093,
0.533631443977356,
0.15256839990615845,
0.047972433269023895,
0.08240137994289398,
-0.38452497124671936,
1.4711534976959229,
-0.27310124039649963,
0.4669865071773529... |
func (t *ZramInfoTracker) Stop(ctx context.Context) error {
if !t.hasZram {
return nil
}
stats, err := getMmStat(ctx)
if err != nil {
return errors.Wrap(err, "failed to read mm_stat")
}
// Update the current mem_used_max if the previous max was higher.
stats[zramMmStatMaxIndex] = math.Max(stats[zramMmStatM... | [
0.010235562920570374,
0.0369320772588253,
0.5348691344261169,
-0.08255885541439056,
0.019170520827174187,
-0.05658998712897301,
0.564767599105835,
-0.43035364151000977,
0.21702849864959717,
0.2368256002664566,
-0.3711246848106384,
0.5737938284873962,
-0.8870169520378113,
-0.039705988019704... |
func (t *ZramInfoTracker) Record(pv *perf.Values) {
if !t.hasZram {
return
}
for i, stat := range t.stats {
pv.Set(perf.Metric{
Name: t.prefix + "RAM.Zram." + zramFieldNames[i],
Unit: "bytes",
Direction: perf.SmallerIsBetter,
}, stat)
}
} | [
0.47256314754486084,
0.36228856444358826,
0.3006840646266937,
-0.47087281942367554,
0.4961570203304291,
0.7732507586479187,
0.9087544679641724,
-0.10188154876232147,
-0.2607625424861908,
-0.17693068087100983,
0.1185181587934494,
0.7040920257568359,
-0.8737936019897461,
0.9002479314804077,
... |
func UnaryServerInterceptor(key interface{}, chained bool) grpc.UnaryServerInterceptor {
return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
var newCtx context.Context
if chained {
newCtx = newContextForHandleRequestIDChain(ctx, key)
... | [
-1.0463393926620483,
-0.4589992165565491,
0.5614606142044067,
-0.44624754786491394,
-0.36038777232170105,
0.19283854961395264,
0.03851716220378876,
0.35477349162101746,
0.5715099573135376,
-0.38722464442253113,
-0.0168310459703207,
0.08273285627365112,
-0.6910431981086731,
-0.2632747888565... |
func StreamServerInterceptor(key interface{}, chained bool) grpc.StreamServerInterceptor {
return func(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error {
var newCtx context.Context
if chained {
newCtx = newContextForHandleRequestIDChain(stream.Context(), ... | [
-0.5620622634887695,
-0.8198060393333435,
0.5431432127952576,
-0.5207652449607849,
-1.0463835000991821,
0.5644535422325134,
-0.3290499448776245,
-0.640830397605896,
0.0920458659529686,
0.06871821731328964,
-0.09740310162305832,
0.7287560701370239,
-0.8955734372138977,
0.3505660593509674,
... |
func NetworkAppend(protocol string, comment string, table string, chain string,
rule ...string) error {
return iptablesAppend(protocol, fmt.Sprintf("LXD network %s", comment),
table, chain, rule...)
} | [
-0.33481454849243164,
-0.06825974583625793,
0.502722442150116,
-0.02568884566426277,
-0.1345164030790329,
0.9056686162948608,
-1.0084049701690674,
0.4624473452568054,
-0.773517370223999,
-0.1024409607052803,
-0.7227997779846191,
-0.3861894905567169,
-0.8270610570907593,
0.5946621894836426,... |
func NetworkPrepend(protocol string, comment string, table string, chain string,
rule ...string) error {
return iptablesPrepend(protocol, fmt.Sprintf("LXD network %s", comment),
table, chain, rule...)
} | [
-0.1906137317419052,
0.1849157214164734,
0.5902448296546936,
-0.8608916997909546,
-0.11544035375118256,
0.7474358081817627,
-0.45620959997177124,
0.19086752831935883,
-0.4266647398471832,
-0.16793647408485413,
-0.6336106657981873,
-0.6996867060661316,
-0.6671677827835083,
0.135925412178039... |
func NetworkClear(protocol string, comment string, table string) error {
return iptablesClear(protocol, fmt.Sprintf("LXD network %s", comment),
table)
} | [
-0.7374625205993652,
0.21524003148078918,
0.32265573740005493,
-0.399203360080719,
-0.5487577319145203,
1.0620448589324951,
-0.7234836220741272,
-0.2985205352306366,
-0.9589204788208008,
0.14631260931491852,
-0.0024869891349226236,
-0.26519566774368286,
-0.3752084970474243,
-0.155064627528... |
func ContainerPrepend(protocol string, comment string, table string,
chain string, rule ...string) error {
return iptablesPrepend(protocol, fmt.Sprintf("LXD container %s", comment),
table, chain, rule...)
} | [
-0.17228099703788757,
-0.0012500222073867917,
0.5857035517692566,
-0.5273115634918213,
-0.14344842731952667,
0.08709923177957535,
-0.4112388491630554,
0.038520246744155884,
-0.2602446675300598,
0.20766089856624603,
-0.11894818395376205,
0.12273689359426498,
-0.20431679487228394,
0.17700020... |
func ContainerClear(protocol string, comment string, table string) error {
return iptablesClear(protocol, fmt.Sprintf("LXD container %s", comment),
table)
} | [
-0.6458011269569397,
0.003029276616871357,
0.30932095646858215,
-0.22945146262645721,
-0.7208672165870667,
0.33202266693115234,
-0.5538986325263977,
-0.4292500913143158,
-0.8117465972900391,
0.5195153951644897,
0.9020142555236816,
0.5720190405845642,
-0.04256328567862511,
-0.03900602832436... |
func RuntimeInfoService(sockets runtime.Sockets) runtimeInfoService {
return runtimeInfoService{
enrichers: make(map[runtime.RuntimeId]runtime.ContainerEnricher),
sockets: sockets,
}
} | [
-0.22669465839862823,
-0.16663165390491486,
0.20321021974086761,
-0.47979605197906494,
0.37619948387145996,
-0.13619501888751984,
-0.35536617040634155,
-1.2532165050506592,
0.12014460563659668,
-0.05973633751273155,
-0.39396244287490845,
1.3094593286514282,
-1.0796899795532227,
0.497256100... |
func (e *runtimeInfoService) Register(rtime runtime.RuntimeId, enricherBuilder func(socket string) (runtime.ContainerEnricher, error)) error {
if !e.sockets.Supports(rtime) {
return errfmt.Errorf("error registering enricher: unsupported runtime %s", rtime.String())
}
socket := e.sockets.Socket(rtime)
enricher, er... | [
-0.9514952301979065,
0.7103281617164612,
0.712165355682373,
-0.293351948261261,
0.43863245844841003,
-0.22491925954818726,
-0.5531580448150635,
-0.8096663951873779,
-0.32710710167884827,
-0.42617422342300415,
-1.072391152381897,
1.6312792301177979,
-0.9952672123908997,
1.2019767761230469,
... |
func (e *runtimeInfoService) Get(ctx context.Context, containerId string, containerRuntime runtime.RuntimeId) (runtime.ContainerMetadata, error) {
if containerRuntime == runtime.Unknown {
return e.getFromUnknownRuntime(ctx, containerId)
}
return e.getFromKnownRuntime(ctx, containerId, containerRuntime)
} | [
-0.641062319278717,
-0.3149945139884949,
0.5495930910110474,
-0.04493262991309166,
0.8214629292488098,
-0.6262364983558655,
-0.9407570958137512,
-0.5585697293281555,
-0.07561226934194565,
0.08355624973773956,
0.2905609905719757,
1.494446039199829,
-0.05187182128429413,
0.6257455945014954,
... |
func (e *runtimeInfoService) getFromKnownRuntime(ctx context.Context, containerId string, containerRuntime runtime.RuntimeId) (runtime.ContainerMetadata, error) {
enricher := e.enrichers[containerRuntime]
if enricher != nil {
return enricher.Get(ctx, containerId)
}
return runtime.ContainerMetadata{}, errfmt.Error... | [
-0.039317287504673004,
-0.13266928493976593,
0.7007405757904053,
0.14616258442401886,
0.14110413193702698,
-0.5270742774009705,
-1.03702974319458,
-0.8193215131759644,
0.1811148226261139,
0.15995919704437256,
-0.3561065196990967,
0.5735241174697876,
-0.1651056706905365,
0.8195160627365112,... |
func (e *runtimeInfoService) getFromUnknownRuntime(ctx context.Context, containerId string) (runtime.ContainerMetadata, error) {
for _, enricher := range e.enrichers {
metadata, err := enricher.Get(ctx, containerId)
if err == nil {
return metadata, nil
}
}
return runtime.ContainerMetadata{}, errfmt.Errorf... | [
-0.2070935070514679,
0.11891449987888336,
0.5990471243858337,
-0.16071465611457825,
0.9669252634048462,
-0.9065209627151489,
-0.7162025570869446,
-1.548569917678833,
0.0584862157702446,
-0.2271733283996582,
-0.29811030626296997,
0.62335604429245,
-0.12712767720222473,
1.2056492567062378,
... |
func FontURL(ctx context.Context, usv libsass.SassValue) (*libsass.SassValue, error) {
var (
path, format string
csv libsass.SassValue
raw bool
)
comp, err := libsass.CompFromCtx(ctx)
if err != nil {
return nil, err
}
err = libsass.Unmarshal(usv, &path, &raw)
if err != nil {
return... | [
0.1866479516029358,
0.08556032180786133,
0.8663564324378967,
-0.12312188744544983,
-0.6859195232391357,
-0.3136042058467865,
0.29320552945137024,
-0.09622319787740707,
0.7864333391189575,
0.3103412389755249,
0.34082460403442383,
1.094408392906189,
1.2724764347076416,
-0.07006138563156128,
... |
func NewLogger() *Logger {
log := &Logger{
&logrus.Logger{
Formatter: &logrus.TextFormatter{},
Out: ioutil.Discard,
Level: logrus.InfoLevel,
Hooks: make(logrus.LevelHooks),
},
}
return log
} | [
0.2613010108470917,
-1.1701514720916748,
0.3167051672935486,
-0.5482560396194458,
-0.9397748112678528,
-0.17875760793685913,
-0.7121762037277222,
0.23044316470623016,
-0.09354707598686218,
-1.161676287651062,
0.3246872127056122,
0.5600666999816895,
0.09243331849575043,
1.011430263519287,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.