text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (i *Identity) GetPrivateSigners(req *idp.GetPrivateSignersRequest) ([]idp.TemporalSigner, error) {
return nil, errors.New("NotImplemented")
} | [
-2.261296033859253,
0.40933141112327576,
0.4206010401248932,
0.36224350333213806,
0.28074923157691956,
-0.3406752943992615,
-0.3612076938152313,
-0.6991098523139954,
0.3684728145599365,
-0.2759404182434082,
-1.2137356996536255,
0.8833240866661072,
-1.3334155082702637,
0.2250029295682907,
... |
func (i *Identity) GetAttributeNames() ([]string, error) {
return nil, errors.New("NotImplemented")
} | [
-0.8262827396392822,
0.15740786492824554,
0.5527019500732422,
1.388338327407837,
0.5319706797599792,
0.194247305393219,
-0.2320362776517868,
0.10757617652416229,
0.7010350227355957,
0.424604207277298,
-0.6445552706718445,
-0.08238603919744492,
-0.19252417981624603,
0.2583249509334564,
0.... |
func (i *Identity) Delete() error {
return errors.New("NotImplemented")
} | [
-0.11465088278055191,
0.1824941635131836,
0.42706575989723206,
0.843008816242218,
1.1358563899993896,
0.6952621936798096,
0.6972894072532654,
0.20029693841934204,
0.6916676163673401,
0.40651628375053406,
-0.33100730180740356,
-0.018413767218589783,
-0.5755387544631958,
0.02923274226486683,... |
func (h *WorkerHandler) Create(token string, queue string, maxJobCount int, attributes map[string]string) (string, error) {
if !h.auth.AuthenticateWorker(token) {
return "", ErrAuthenticationError
}
worker := database.Worker{
ID: uuid.GenerateUUID(),
Queue: queue,
MaxJobCount: maxJobCount,
... | [
0.02306954376399517,
0.34613361954689026,
0.6592221260070801,
0.05277296528220177,
-0.03947155922651291,
0.5629355907440186,
-0.7953487634658813,
-0.24410250782966614,
-0.911216139793396,
0.15171092748641968,
-0.5737568736076355,
-1.1504660844802856,
-0.6311962604522705,
-0.057874154299497... |
func InitLedger(ctx TransactionContextInterface) error {
fmt.Println(ctx.GetStub())
return nil
} | [
0.3519832193851471,
-0.29887834191322327,
0.5600241422653198,
-0.5121186375617981,
0.10486724227666855,
0.2312213033437729,
-0.030018316581845284,
0.9780735373497009,
0.43675878643989563,
-0.4943815767765045,
0.009372440166771412,
0.473246693611145,
-0.3477779030799866,
1.4847416877746582,... |
func NewConfigManager(storeCallback func([]*PeerConfig) error) *ConfigManager {
return &ConfigManager{
storeCallback: storeCallback,
storeOnChange: false,
peers: []*PeerConfig{},
}
} | [
-1.4547700881958008,
-0.2505212724208832,
0.24334418773651123,
0.22139574587345123,
-1.228407382965088,
-0.7628322243690491,
-0.6556149125099182,
0.4081782400608063,
0.6824866533279419,
-0.10884462296962738,
-0.6048679351806641,
-0.6446400880813599,
-1.0297763347625732,
2.106415033340454,
... |
func (pm *ConfigManager) Peers() []*PeerConfig {
pm.peersLock.RLock()
defer pm.peersLock.RUnlock()
peers := make([]*PeerConfig, len(pm.peers))
copy(peers, pm.peers)
return peers
} | [
-1.581346869468689,
-0.33225372433662415,
0.1131066083908081,
-0.33516475558280945,
-0.4175410866737366,
0.2737264633178711,
-0.7707765698432922,
-0.14942748844623566,
0.361757755279541,
0.43445152044296265,
-0.17998701333999634,
0.3493947982788086,
-1.344464898109436,
1.183522343635559,
... |
func (pm *ConfigManager) AddPeer(multiAddress multiaddr.Multiaddr, alias string) error {
pm.peersLock.Lock()
defer pm.peersLock.Unlock()
newPeerAddrInfo, err := peer.AddrInfoFromP2pAddr(multiAddress)
if err != nil {
return err
}
for _, p := range pm.peers {
multiAddr, err := multiaddr.NewMultiaddr(p.MultiAd... | [
-0.7320261597633362,
-0.320525199174881,
0.7585586905479431,
0.14842721819877625,
-0.21473462879657745,
0.6194509267807007,
-0.5341166853904724,
0.9285331964492798,
0.24189317226409912,
0.27099207043647766,
-0.18166714906692505,
-0.7893284559249878,
-1.0029670000076294,
1.1447782516479492,... |
func (pm *ConfigManager) RemovePeer(peerID peer.ID) error {
pm.peersLock.Lock()
defer pm.peersLock.Unlock()
for i, p := range pm.peers {
multiAddr, err := multiaddr.NewMultiaddr(p.MultiAddress)
if err != nil {
// ignore wrong values in the config file
continue
}
addrInfo, err := peer.AddrInfoFromP2pA... | [
-0.8451540470123291,
-0.6389562487602234,
0.5044083595275879,
-0.30479609966278076,
-0.4265999495983124,
-0.19141797721385956,
-0.286847859621048,
0.8938321471214294,
0.19333459436893463,
0.6735019683837891,
-0.16038778424263,
-0.7234256863594055,
-1.4345424175262451,
1.2239621877670288,
... |
func (pm *ConfigManager) StoreOnChange(store bool) {
pm.storeOnChange = store
} | [
-0.5943214893341064,
-0.2948628067970276,
0.27888816595077515,
0.4091489613056183,
-1.0930142402648926,
0.605884313583374,
-0.0662216916680336,
0.3123711347579956,
0.2673271894454956,
0.20336423814296722,
-0.6588047742843628,
0.03473886847496033,
-1.106964111328125,
1.6257115602493286,
0... |
func (pm *ConfigManager) Store() error {
if !pm.storeOnChange {
return nil
}
if pm.storeCallback == nil {
return nil
}
if err := pm.storeCallback(pm.peers); err != nil {
return fmt.Errorf("failed to store peering config: %w", err)
}
return nil
} | [
-0.5457066297531128,
0.48553308844566345,
0.19481226801872253,
-0.18482264876365662,
-0.197199746966362,
0.18627354502677917,
-0.10401593148708344,
-0.021868284791707993,
0.37800073623657227,
-0.19087325036525726,
0.00878384243696928,
-0.10174443572759628,
-1.0874178409576416,
1.5042340755... |
func New(options ...Option) *PersistentVolume {
pv := &PersistentVolume{}
for _, op := range options {
op(pv)
}
return pv
} | [
-0.12086404860019684,
-0.2877556085586548,
0.46512141823768616,
1.069548487663269,
-0.3825939893722534,
-0.06943168491125107,
-0.6655911803245544,
-0.20395073294639587,
-0.6085324287414551,
-0.1507207155227661,
0.6650153398513794,
-0.4741584360599518,
-0.5553049445152283,
-0.13915061950683... |
func WithCompleteParams(addr string, client *httpclient.HTTPClient) Option {
return func(pv *PersistentVolume) {
pv.addr = addr
pv.client = client
}
} | [
0.8302842974662781,
-0.7633914351463318,
0.6261977553367615,
-0.36867308616638184,
-0.1411735564470291,
0.019918125122785568,
0.24203068017959595,
-0.5177183151245117,
-0.26268839836120605,
0.8211590647697449,
0.4847748875617981,
-0.30915775895118713,
-0.08915823698043823,
0.08299814909696... |
func (p *PersistentVolume) Create(pv *apiv1.PersistentVolume) error {
var b bytes.Buffer
resp, err := p.client.Post(p.addr).
Path("/api/v1/persistentvolumes").
JSONBody(pv).
Do().
Body(&b)
if err != nil {
return errors.Errorf("failed to create pv, name: %s, (%v)", pv.Name, err)
}
if !resp.IsOK() {
re... | [
-0.9196123480796814,
0.06482261419296265,
0.48928654193878174,
0.3305196762084961,
-0.12198365479707718,
0.47000643610954285,
-0.8594898581504822,
-0.6114366054534912,
-0.11096286028623581,
0.3427293002605438,
0.18622906506061554,
-0.3632230758666992,
-1.4027419090270996,
0.245828494429588... |
func (p *PersistentVolume) Delete(name string) error {
var b bytes.Buffer
path := strutil.Concat("/api/v1/persistentvolumes/", name)
resp, err := p.client.Delete(p.addr).
Path(path).
Do().
Body(&b)
if err != nil {
return errors.Errorf("failed to delete pv, name: %s, (%v)", name, err)
}
if !resp.IsOK() {... | [
-0.12949256598949432,
-0.09281224012374878,
0.804038405418396,
0.16163276135921478,
-0.26672104001045227,
0.09234750270843506,
-0.8472452163696289,
-0.42918190360069275,
0.48073917627334595,
1.0283232927322388,
0.43941614031791687,
0.09251302480697632,
-1.5694960355758667,
-0.3216946423053... |
func (p *PersistentVolume) List(name string) (apiv1.PersistentVolumeList, error) {
var b bytes.Buffer
var list apiv1.PersistentVolumeList
path := "/api/v1/persistentvolumes/"
resp, err := p.client.Get(p.addr).
Path(path).
Do().
Body(&b)
if err != nil {
return list, errors.Errorf("failed to list related p... | [
-0.15517227351665497,
-0.7470532059669495,
0.9454141855239868,
-0.07049470394849777,
-0.09810775518417358,
-0.4081841707229614,
-1.2454367876052856,
-0.18542957305908203,
0.8660605549812317,
1.0862318277359009,
-0.4379812180995941,
0.07968208938837051,
-0.9798186421394348,
-0.0491620488464... |
func GetDefaultConfig() *Config {
return &Config{
Settings: ConfigSettings{
ElectionID: "ilert-kube-agent",
Namespace: "kube-system",
Port: 9092,
CheckInterval: "15s",
Log: ConfigSettingsLog{
JSON: false,
Level: "info",
},
},
Alarms: ConfigAlarms{
Cluster: ConfigAlar... | [
0.6603949666023254,
0.10080144554376602,
0.5152580142021179,
0.3059898614883423,
0.3790680468082428,
-0.12376262992620468,
-0.7750759124755859,
0.40240126848220825,
0.16662396490573883,
0.18153971433639526,
-0.5210480093955994,
0.31395143270492554,
-0.34082499146461487,
1.0088762044906616,... |
func NewRepository(pool *pgxpool.Pool) *Repository {
return &Repository{pool: pool}
} | [
-0.20439329743385315,
-0.5678802728652954,
0.024604907259345055,
0.2663055658340454,
-0.5535942912101746,
-0.13943473994731903,
-0.2015015184879303,
-0.31662455201148987,
0.03521532937884331,
-0.4496955871582031,
-0.4257265031337738,
0.7056097388267517,
-0.26970407366752625,
0.147656038403... |
func (s *Repository) GetAll(ctx context.Context) ([]Category, error) {
const limit = 20
rows, err := s.pool.Query(
ctx,
`select "ID", "name", "logo" from category
limit $1`,
limit)
if err != nil {
return nil, err
}
defer rows.Close()
buffer := make([]Category, limit)
i := 0
for rows.Next() {
va... | [
0.02394348755478859,
0.8755664825439453,
0.6471377015113831,
0.003926440607756376,
0.4282841086387634,
-0.3029893934726715,
-0.05042222887277603,
-0.38334131240844727,
-0.046312421560287476,
-0.8077664971351624,
-0.2809090316295624,
0.42630764842033386,
0.2573753297328949,
0.42137321829795... |
func (s Status) ToEnc() *Enc {
return NewErrorEnc(s)
} | [
0.35902416706085205,
-0.4828845262527466,
0.0635409727692604,
-0.23886610567569733,
-1.009835124015808,
-0.7507135272026062,
0.27946335077285767,
-0.21409283578395844,
0.03833794221282005,
-0.09650199860334396,
-0.4609317183494568,
0.8983914256095886,
1.9664510488510132,
-0.213503360748291... |
func Constructor() Trie {
return Trie{}
} | [
0.6472830176353455,
-0.2369176596403122,
-0.26657453179359436,
0.8756429553031921,
-0.19444385170936584,
0.3500429391860962,
1.094781517982483,
1.2271250486373901,
-0.4620465338230133,
-0.5681378841400146,
-0.43559905886650085,
0.118797168135643,
-0.2689116895198822,
0.11216726899147034,
... |
func (this *Trie) Insert(word string) {
for _,v := range word{
if this.name[v-'a'] == nil{
this.name[v-'a'] = new(Trie)
fmt.Println(this.name)
}
this = this.name[v-'a']
}
this.isWord = true
} | [
-0.39466485381126404,
0.5433862209320068,
0.41508811712265015,
-0.790830135345459,
0.168935626745224,
0.11677799373865128,
0.5237439870834351,
0.48881611227989197,
-0.2695678174495697,
0.9956271052360535,
-0.9969828128814697,
0.23039640486240387,
-1.4636963605880737,
1.0013751983642578,
... |
func (this *Trie) Search(word string) bool {
for _,v :=range word{
if this.name[v-'a'] == nil{
return false
}
this = this.name[v-'a']
}
if this.isWord == false{
return false
}
return true
} | [
-0.6554126143455505,
0.36742207407951355,
0.47402334213256836,
-0.12288287281990051,
-0.5972974896430969,
0.6843155026435852,
0.07506255060434341,
-0.18290503323078156,
0.0785955861210823,
0.526116669178009,
0.1482180505990982,
-0.24028651416301727,
-1.6543856859207153,
0.9337863922119141,... |
func (this *Trie) StartsWith(prefix string) bool {
for _,v :=range prefix{
if this.name[v-'a'] == nil{
return false
}
this = this.name[v-'a']
}
return true
} | [
-0.035859379917383194,
-0.5008276700973511,
0.5319046974182129,
-0.12482764571905136,
-0.4633067846298218,
-0.8445572257041931,
-0.7135494351387024,
-0.09074386954307556,
0.5960996747016907,
0.570529043674469,
-0.5893111824989319,
-0.11430836468935013,
-0.13883806765079498,
0.4056034982204... |
func main() {
multiplicationTables()
} | [
0.36159202456474304,
0.4941643178462982,
0.390042781829834,
2.4404795169830322,
-0.5039678812026978,
0.49256762862205505,
1.7533843517303467,
-0.08304867148399353,
-0.4744076728820801,
-0.4016084671020508,
-1.2048192024230957,
-0.1693301796913147,
0.4303765892982483,
0.8095284700393677,
... |
func NewID(v string) ID {
return ID{v, true}
} | [
0.9318400621414185,
-0.05992833897471428,
-0.07784034311771393,
-0.03417326137423515,
-0.8926071524620056,
0.7562604546546936,
-0.4797345697879791,
0.5785281658172607,
1.4075831174850464,
0.5090247392654419,
-0.4532548189163208,
0.14609701931476593,
-0.5596759915351868,
-0.7383942008018494... |
func NilID() ID {
return ID{"", false}
} | [
0.41547030210494995,
-0.7750458717346191,
0.2350696474313736,
-0.7245386838912964,
-0.8720070123672485,
0.5016503930091858,
-1.166839838027954,
0.06563659012317657,
0.30210691690444946,
-0.2283640205860138,
-0.3598787188529968,
0.028081325814127922,
-0.6243695616722107,
-0.0476347766816616... |
func (v ID) String() string {
return v.v
} | [
0.13857819139957428,
-1.4015636444091797,
-0.21605223417282104,
-0.419105589389801,
-0.43320971727371216,
0.8621143698692322,
0.04646245017647743,
-1.2480987310409546,
0.7509978413581848,
0.052791960537433624,
-0.26927608251571655,
0.9382662177085876,
-0.010411221534013748,
-0.615670680999... |
func (v ID) Nil() bool {
return !v.present
} | [
-0.2659344971179962,
-0.7733051180839539,
0.2441549003124237,
0.04270952567458153,
0.10886945575475693,
0.9817804098129272,
-0.4837009608745575,
1.116530418395996,
0.322124719619751,
0.1961093246936798,
-0.4844715893268585,
0.0790710598230362,
-0.5102378726005554,
-0.3416503369808197,
-0... |
func (v ID) ToLiteralValue() (schema.LiteralValue, error) {
if !v.present {
return nil, nil
}
return schema.LiteralString(v.v), nil
} | [
0.7986471652984619,
-0.7529342770576477,
0.5185142159461975,
-0.7858660817146301,
-0.31625762581825256,
-0.10829965025186539,
-0.9477104544639587,
1.0790653228759766,
0.8206163048744202,
0.3589494526386261,
-0.2591119706630707,
0.5877568125724792,
0.09703490883111954,
-0.10716573148965836,... |
func (v *ID) FromLiteralValue(l schema.LiteralValue) error {
if l == nil {
*v = ID{"", false}
return nil
}
switch c := l.(type) {
case schema.LiteralString:
s := string(c)
*v = ID{s, true}
return nil
case schema.LiteralNumber:
s := strconv.Itoa(int(c))
*v = ID{s, true}
return nil
default:
retur... | [
0.6455535888671875,
-1.103859782218933,
0.19654539227485657,
-0.2519749402999878,
-1.4540282487869263,
0.2839948534965515,
-0.49296244978904724,
0.9012354016304016,
0.8367553949356079,
-0.5149781703948975,
-0.39933404326438904,
0.12181304395198822,
0.1723880022764206,
0.28439709544181824,
... |
func NewString(v string) String {
return String{v, true}
} | [
-0.03453696891665459,
-0.038588475435972214,
-0.018506713211536407,
-0.4936975836753845,
-1.6022980213165283,
0.16742196679115295,
-0.04977545142173767,
0.07376498728990555,
0.7099626660346985,
0.7096818685531616,
-0.6432554125785828,
-0.06261592358350754,
0.39604702591896057,
-0.592241168... |
func NewStringNilEmpty(v string) String {
if v == "" {
return String{"", false}
}
return String{v, true}
} | [
-0.2296602874994278,
-0.5515578985214233,
0.09175655245780945,
0.11554526537656784,
-0.4584319293498993,
-0.7159036993980408,
-0.9870962500572205,
-0.279024213552475,
0.30653324723243713,
0.8483328223228455,
-0.24409857392311096,
-0.502842903137207,
-0.11237514019012451,
-0.459705054759979... |
func NilString() String {
return String{"", false}
} | [
-0.2522353529930115,
-0.3598112463951111,
0.33751216530799866,
-0.8863848447799683,
-0.9725333452224731,
0.14064186811447144,
-0.3656374514102936,
-0.9874221086502075,
0.032649926841259,
0.012166045606136322,
-0.23857569694519043,
-0.2660084366798401,
-0.3446892201900482,
-0.08552595227956... |
func (v String) String() string {
return v.v
} | [
0.4182174801826477,
-1.1731131076812744,
-0.23614774644374847,
-0.5850081443786621,
-0.49071598052978516,
0.43634873628616333,
0.874265193939209,
-0.8390947580337524,
0.45910272002220154,
-0.24148182570934296,
0.10806915163993835,
1.2181023359298706,
0.10957737267017365,
-0.576555848121643... |
func (v String) Nil() bool {
return !v.present
} | [
0.3129899203777313,
-1.1184182167053223,
0.2570045590400696,
-0.29839977622032166,
-0.29625028371810913,
0.7918397188186646,
-0.4071117043495178,
1.222025990486145,
0.1979915350675583,
0.29425740242004395,
0.14806997776031494,
0.41117775440216064,
-0.4802935719490051,
-0.7174853086471558,
... |
func (v String) ToLiteralValue() (schema.LiteralValue, error) {
if !v.present {
return nil, nil
}
return schema.LiteralString(v.v), nil
} | [
1.3214137554168701,
-0.974799394607544,
0.5691452026367188,
-0.6891117095947266,
-0.4921945631504059,
-0.06218506768345833,
-0.5707645416259766,
1.3885945081710815,
0.7827537059783936,
0.2605910003185272,
-0.0440780445933342,
0.9115434885025024,
-0.05586443841457367,
-0.46541815996170044,
... |
func (v *String) FromLiteralValue(l schema.LiteralValue) error {
if l == nil {
*v = String{"", false}
return nil
}
if PermissiveInputParsing {
switch c := l.(type) {
case schema.LiteralBool:
*v = String{fmt.Sprintf("%v", c), true}
PermissiveInputCallback("String", l)
return nil
case schema.Litera... | [
1.0248724222183228,
-0.7706027626991272,
0.2748788297176361,
-0.08630701899528503,
-1.6906791925430298,
0.3873550593852997,
-0.04571305587887764,
0.510480523109436,
0.9722079634666443,
-0.40492919087409973,
0.29706791043281555,
0.3116495907306671,
0.10384702682495117,
0.2906467914581299,
... |
func NewInt(v int32) Int {
return Int{v, true}
} | [
0.3685378432273865,
0.6502826809883118,
0.009648583829402924,
-0.8760709166526794,
-1.4044009447097778,
0.4754246771335602,
-0.43968626856803894,
-0.5915318131446838,
0.07466547936201096,
0.2508721649646759,
-0.595139741897583,
-0.04575613513588905,
-0.19510409235954285,
-0.591273844242096... |
func NilInt() Int {
return Int{0, false}
} | [
-0.08835624158382416,
-0.7697935700416565,
0.3753758370876312,
-1.3228869438171387,
-0.6714168787002563,
-0.2559536397457123,
-0.10913370549678802,
-0.6397480964660645,
0.1292978674173355,
-0.43206360936164856,
-0.15514779090881348,
-0.01312955655157566,
-1.5360709428787231,
-0.12119398266... |
func (v Int) Int32() int32 {
return v.v
} | [
0.24491702020168304,
-0.2473423033952713,
-0.02804795280098915,
-0.749424397945404,
-0.11290243268013,
0.8670064210891724,
-0.2477898895740509,
-0.43457451462745667,
0.33377522230148315,
-0.8327386975288391,
0.2646740972995758,
0.8134657740592957,
-0.2193465530872345,
-0.1339910328388214,
... |
func (v Int) Nil() bool {
return !v.present
} | [
-0.42312586307525635,
-0.4720165431499481,
0.30533841252326965,
-0.48796483874320984,
0.07485969364643097,
1.0363823175430298,
0.10689040273427963,
0.7920119762420654,
-0.09503164142370224,
0.29914435744285583,
-0.41938516497612,
-0.2546887993812561,
-0.8176400065422058,
-0.204484120011329... |
func (v Int) ToLiteralValue() (schema.LiteralValue, error) {
if !v.present {
return nil, nil
}
return schema.LiteralNumber(v.v), nil
} | [
0.7591420412063599,
-0.46100693941116333,
0.603405237197876,
-0.9348039627075195,
-0.22747577726840973,
-0.08517348766326904,
-0.22105342149734497,
1.0515344142913818,
0.6738014221191406,
0.25671228766441345,
-0.6093776226043701,
0.24575544893741608,
0.08990444242954254,
0.0227663144469261... |
func (v *Int) FromLiteralValue(l schema.LiteralValue) error {
if l == nil {
*v = Int{0, false}
return nil
}
if PermissiveInputParsing {
switch c := l.(type) {
case schema.LiteralString:
i, err := strconv.ParseInt(string(c), 10, 32)
if err != nil {
return err
}
*v = Int{int32(i), true}
Per... | [
0.7781056761741638,
-0.4968905448913574,
0.4200948178768158,
-0.6519148349761963,
-1.443350076675415,
0.3100908100605011,
0.5065264701843262,
0.35839876532554626,
0.2801089882850647,
-0.2104884833097458,
-0.06864798814058304,
0.045145388692617416,
-0.45422813296318054,
0.17074905335903168,... |
func NewFloat(v float64) Float {
return Float{v, true}
} | [
0.9001695513725281,
0.9187111854553223,
0.07212964445352554,
0.5291814208030701,
-0.8061122298240662,
-0.8219150900840759,
-0.393629789352417,
0.35815900564193726,
0.4119430482387543,
-0.6243752837181091,
-0.301126629114151,
-0.08135713636875153,
0.2738266587257385,
0.2848784625530243,
-... |
func NilFloat() Float {
return Float{0, false}
} | [
1.55125093460083,
-0.2562200725078583,
0.21872174739837646,
-0.8578855991363525,
-0.7679585218429565,
-0.8361017107963562,
-0.36631038784980774,
-0.3954821228981018,
-0.22220952808856964,
-1.4025119543075562,
0.33396685123443604,
-0.13379359245300293,
-0.86080402135849,
1.2724535465240479,... |
func (v Float) Float64() float64 {
return v.v
} | [
0.14817918837070465,
0.07387161254882812,
-0.08092201501131058,
1.0416587591171265,
0.9607160687446594,
-0.3859671950340271,
0.6489390134811401,
-0.1915864795446396,
-0.04903397336602211,
-1.0486456155776978,
0.59671550989151,
0.1946927160024643,
-0.3457561135292053,
0.592950701713562,
-... |
func (v Float) Nil() bool {
return !v.present
} | [
0.35511836409568787,
-0.017074551433324814,
0.2862561345100403,
0.24497637152671814,
0.22277922928333282,
0.8173644542694092,
0.06589119136333466,
1.1926544904708862,
-0.5679664015769958,
-0.3511040210723877,
-0.043900880962610245,
-0.2683611810207367,
-0.27817994356155396,
0.2601103484630... |
func (v Float) ToLiteralValue() (schema.LiteralValue, error) {
if !v.present {
return nil, nil
}
return schema.LiteralNumber(v.v), nil
} | [
1.1321625709533691,
0.10122184455394745,
0.6519402861595154,
-0.2189950793981552,
-0.04808419197797775,
-0.08813008666038513,
-0.0015071878442540765,
1.2262977361679077,
0.21588915586471558,
-0.12909430265426636,
-0.29875287413597107,
0.32897883653640747,
0.10062786191701889,
0.11651960760... |
func (v *Float) FromLiteralValue(l schema.LiteralValue) error {
if l == nil {
*v = Float{0, false}
return nil
}
if PermissiveInputParsing {
switch c := l.(type) {
case schema.LiteralString:
f, err := strconv.ParseFloat(string(c), 64)
if err != nil {
return err
}
*v = Float{f, true}
Permis... | [
1.1444740295410156,
-0.2512199878692627,
0.3350941240787506,
0.23533324897289276,
-1.3582409620285034,
0.09630724787712097,
0.14772595465183258,
0.8934744596481323,
0.3924659788608551,
-0.6433546543121338,
0.1285494714975357,
0.1379917562007904,
0.034034185111522675,
0.692179799079895,
0... |
func NewBoolean(v bool) Boolean {
return Boolean{v, true}
} | [
-0.08475442975759506,
-0.0340232215821743,
0.23169410228729248,
0.5957762598991394,
-1.0243477821350098,
0.08845408260822296,
-0.2320086658000946,
0.5298855900764465,
-0.21846631169319153,
-0.4665530025959015,
-1.421151876449585,
0.1847391575574875,
-0.35378387570381165,
-0.348549485206604... |
func NilBoolean() Boolean {
return Boolean{false, false}
} | [
-0.2159118503332138,
-0.6710801720619202,
0.635484516620636,
0.07299625873565674,
-0.2877848148345947,
-0.44241833686828613,
-0.7156508564949036,
0.5921759009361267,
-0.1868523359298706,
-0.8035222887992859,
-1.0765670537948608,
0.2699267566204071,
-1.1209582090377808,
0.5361894965171814,
... |
func (v Boolean) Bool() bool {
return v.v
} | [
0.5020920038223267,
-0.20377981662750244,
0.08573536574840546,
0.3703690469264984,
0.35373663902282715,
0.9365764260292053,
0.6536479592323303,
1.158869743347168,
0.2595250606536865,
0.23581302165985107,
0.024412231519818306,
0.7197023630142212,
0.3526184558868408,
-1.0979300737380981,
-... |
func (v Boolean) Nil() bool {
return !v.present
} | [
-0.01015184074640274,
-0.5954471826553345,
0.3183269202709198,
0.3623436987400055,
0.2710166275501251,
1.2308897972106934,
0.04844215512275696,
1.4234907627105713,
-0.5201737284660339,
0.5114850401878357,
-0.33998996019363403,
-0.046367447823286057,
-0.5051354169845581,
-0.5882238149642944... |
func (v Boolean) ToLiteralValue() (schema.LiteralValue, error) {
if !v.present {
return nil, nil
}
return schema.LiteralBool(v.v), nil
} | [
0.7910382151603699,
-0.2410425990819931,
0.6037458777427673,
-0.2710407078266144,
0.02886861376464367,
0.13028956949710846,
-0.4371732771396637,
1.4819684028625488,
-0.03317108750343323,
0.6269566416740417,
-0.21099336445331573,
0.6177753806114197,
-0.09778347611427307,
-0.5952747464179993... |
func (v *Boolean) FromLiteralValue(l schema.LiteralValue) error {
if l == nil {
*v = Boolean{false, false}
return nil
}
if PermissiveInputParsing {
switch c := l.(type) {
case schema.LiteralString:
s := string(c)
if s == "true" {
*v = Boolean{true, true}
PermissiveInputCallback("Boolean", l)
... | [
0.755824089050293,
-0.6549217104911804,
0.47622907161712646,
0.17671003937721252,
-1.6540614366531372,
0.21012437343597412,
0.16473855078220367,
0.8206505179405212,
0.5691002607345581,
-0.3828163743019104,
-0.30778148770332336,
0.034887395799160004,
-0.16844920814037323,
0.2085644602775573... |
func SelectCase(){
var number,a chan int // key chan untuk membuat channel
var nomor, b int
select {
case nomor = <-number:
fmt.Println("menerima ",nomor," dari <-number")
case a <-b:
fmt.Println("mengirim ",b," ke a")
case b, ok := <-a:
if ok {
fmt.Println("menerima ", b, " from a")
} else {... | [
0.005911885295063257,
-0.49834632873535156,
0.5682865977287292,
0.5641215443611145,
0.1690961867570877,
0.12160451710224152,
-0.057409659028053284,
-1.1715086698532104,
-0.33569303154945374,
0.8884642124176025,
0.6836258172988892,
0.5309896469116211,
-0.5605327486991882,
0.2445146441459655... |
func (c *Local) LocalDiscoveryService() fab.DiscoveryService {
return c.localDiscovery
} | [
1.56942880153656,
-0.8515607118606567,
-0.08837762475013733,
0.41053226590156555,
-0.2892296314239502,
-0.04264203459024429,
0.31369924545288086,
-0.24110466241836548,
0.4562130570411682,
-1.1184837818145752,
0.049965616315603256,
-0.2646980881690979,
-0.058440808206796646,
0.9113010168075... |
func (c *Channel) Providers() context.Client {
return c
} | [
-0.169796884059906,
-0.38187897205352783,
0.029926860705018044,
-1.1402095556259155,
0.5288306474685669,
0.46443861722946167,
-0.027018383145332336,
-0.39074885845184326,
0.7880944609642029,
-0.28818023204803467,
-0.014561660587787628,
0.8983393907546997,
-1.4413045644760132,
-0.4465976655... |
func (c *Channel) ChannelService() fab.ChannelService {
return c.channelService
} | [
0.6519668698310852,
-0.2600332796573639,
0.13686777651309967,
-0.35267066955566406,
0.27147671580314636,
0.2592217028141022,
-0.43523108959198,
-0.7418175935745239,
-0.09871596097946167,
-0.7246966361999512,
0.30585184693336487,
1.2863718271255493,
-0.992580235004425,
0.5220949649810791,
... |
func (c *Channel) ChannelID() string {
return c.channelID
} | [
1.3475397825241089,
-0.9793925881385803,
-0.04322528839111328,
-0.12430548667907715,
0.7795847654342651,
1.7181944847106934,
0.3306756615638733,
0.6020322442054749,
0.8030287027359009,
0.14357662200927734,
0.6706978678703308,
1.3916206359863281,
0.03110763058066368,
0.8550786375999451,
-... |
func (c *Provider) CryptoSuite() core.CryptoSuite {
return c.cryptoSuite
} | [
0.037068385630846024,
0.16423219442367554,
0.3619230091571808,
-0.08920957893133163,
0.20263196527957916,
0.4144980013370514,
0.3950625956058502,
-0.7312496900558472,
0.47786062955856323,
0.2679210603237152,
-0.1385246068239212,
0.437011182308197,
-0.953698456287384,
-0.6085160374641418,
... |
func (c *Provider) IdentityManager(orgName string) (msp.IdentityManager, bool) {
return c.idMgmtProvider.IdentityManager(orgName)
} | [
-1.3220008611679077,
0.36545488238334656,
0.4000791311264038,
-0.6099300384521484,
-0.10118614137172699,
-0.06351443380117416,
-0.5228849053382874,
0.00967668741941452,
1.0676268339157104,
0.4003818929195404,
-0.8879001140594482,
-0.37667956948280334,
-1.7268526554107666,
0.448554039001464... |
func (c *Provider) SigningManager() core.SigningManager {
return c.signingManager
} | [
-0.9156164526939392,
-0.045636702328920364,
0.381430059671402,
-0.13754545152187347,
-0.6050944328308105,
-0.06521683186292648,
-0.11156175285577774,
0.8721746802330017,
0.9828293919563293,
-0.8178318738937378,
-0.01700274460017681,
-1.1064364910125732,
-1.0850722789764404,
1.0881208181381... |
func (c *Provider) UserStore() msp.UserStore {
return c.userStore
} | [
0.037341389805078506,
-0.4253498613834381,
0.07065045088529587,
-0.032409146428108215,
-1.0768619775772095,
0.5163763761520386,
0.22831514477729797,
0.1635773926973343,
1.6645790338516235,
-0.5248156785964966,
-0.29735618829727173,
0.2770434021949768,
-0.9712269306182861,
-0.99836832284927... |
func (c *Provider) IdentityConfig() msp.IdentityConfig {
return c.identityConfig
} | [
0.7501508593559265,
-0.3349991738796234,
0.19717516005039215,
0.20604918897151947,
-0.0836782231926918,
0.6456847190856934,
0.15379245579242706,
0.781327486038208,
0.9979413151741028,
0.7722404599189758,
-1.1278401613235474,
0.4979356527328491,
-0.9273122549057007,
0.2870318293571472,
0.... |
func (c *Provider) LocalDiscoveryProvider() fab.LocalDiscoveryProvider {
return c.localDiscoveryProvider
} | [
1.1485321521759033,
-0.26252248883247375,
-0.02478281781077385,
0.29346948862075806,
-0.49026021361351013,
0.6157165765762329,
0.7281316518783569,
0.11564643681049347,
1.079667329788208,
-0.14483685791492462,
-0.40399307012557983,
-0.5128276348114014,
0.08142758905887604,
0.439299285411834... |
func (c *Provider) ChannelProvider() fab.ChannelProvider {
return c.channelProvider
} | [
0.9968064427375793,
0.20078785717487335,
-0.1006847694516182,
-0.006755686830729246,
0.20841450989246368,
1.0729889869689941,
0.23407219350337982,
-0.12182822823524475,
0.6731967329978943,
0.28481364250183105,
0.4498595595359802,
0.9326416254043579,
-0.2979119122028351,
-0.1457806378602981... |
func (c *Provider) InfraProvider() fab.InfraProvider {
return c.infraProvider
} | [
0.13811011612415314,
0.366227924823761,
0.04664402827620506,
0.5142644643783569,
-0.16667747497558594,
0.87785804271698,
0.7843018770217896,
-0.5063237547874451,
-0.06939879804849625,
-0.19196292757987976,
-0.48228970170021057,
-0.024790391325950623,
-1.3588334321975708,
0.0010956609621644... |
func (c *Provider) EndpointConfig() fab.EndpointConfig {
return c.endpointConfig
} | [
0.8731576204299927,
0.22067289054393768,
0.2509004473686218,
0.5511647462844849,
0.02614925429224968,
0.756000816822052,
0.19266679883003235,
1.3867398500442505,
0.38703829050064087,
0.48018860816955566,
-0.32518935203552246,
0.3573989272117615,
-0.7574477195739746,
0.421015202999115,
0.... |
func (c *Provider) GetMetrics() *metrics.ClientMetrics {
return c.clientMetrics
} | [
0.7388355135917664,
0.9706740379333496,
0.07814338803291321,
-0.2979430854320526,
0.20369550585746765,
0.501062273979187,
0.9407908916473389,
-0.9046597480773926,
0.6490078568458557,
-0.5299335718154907,
0.2881397306919098,
0.8168773055076599,
-0.7994110584259033,
-0.21861746907234192,
-... |
func WithCryptoSuiteConfig(cryptoSuiteConfig core.CryptoSuiteConfig) SDKContextParams {
return func(ctx *Provider) {
ctx.cryptoSuiteConfig = cryptoSuiteConfig
}
} | [
-0.24757762253284454,
0.4888054430484772,
0.5795584321022034,
0.150338813662529,
-0.11387374252080917,
-0.005288947839289904,
-0.061053406447172165,
0.3307687044143677,
0.6337313652038574,
0.9966581463813782,
-0.8828588724136353,
-0.031071066856384277,
0.4013504385948181,
0.297466844320297... |
func WithEndpointConfig(endpointConfig fab.EndpointConfig) SDKContextParams {
return func(ctx *Provider) {
ctx.endpointConfig = endpointConfig
}
} | [
0.08079621195793152,
-0.004707983694970608,
0.6515124440193176,
0.39176276326179504,
-0.6542719006538391,
0.44108331203460693,
-0.08797390013933182,
1.088683843612671,
0.7102148532867432,
0.8018402457237244,
-0.7664034962654114,
-0.3941226303577423,
0.2702997326850891,
0.5222651958465576,
... |
func WithIdentityConfig(identityConfig msp.IdentityConfig) SDKContextParams {
return func(ctx *Provider) {
ctx.identityConfig = identityConfig
}
} | [
-0.006170311011373997,
-0.09165065735578537,
0.600933313369751,
0.17107877135276794,
-0.7076000571250916,
-0.1405227780342102,
0.06249755248427391,
0.5960107445716858,
1.3860752582550049,
1.1134358644485474,
-1.3607310056686401,
-0.1592281609773636,
0.17752031981945038,
0.8802444934844971,... |
func WithUserStore(userStore msp.UserStore) SDKContextParams {
return func(ctx *Provider) {
ctx.userStore = userStore
}
} | [
0.079180508852005,
0.040155161172151566,
0.33576032519340515,
0.2596752643585205,
-1.7197657823562622,
0.13257873058319092,
-0.035220917314291,
0.05475996807217598,
0.9942810535430908,
-0.19554904103279114,
-0.055466197431087494,
-0.43174055218696594,
0.6048276424407959,
-0.130314260721206... |
func WithCryptoSuite(cryptoSuite core.CryptoSuite) SDKContextParams {
return func(ctx *Provider) {
ctx.cryptoSuite = cryptoSuite
}
} | [
-0.602921724319458,
0.48320987820625305,
0.6445124745368958,
0.15184791386127472,
0.02402128092944622,
0.04245879873633385,
-0.1951790153980255,
-0.6971452236175537,
0.7040492296218872,
0.4358573853969574,
-0.2717727720737457,
0.20521745085716248,
-0.18632011115550995,
-0.1473163515329361,... |
func WithLocalDiscoveryProvider(discoveryProvider fab.LocalDiscoveryProvider) SDKContextParams {
return func(ctx *Provider) {
ctx.localDiscoveryProvider = discoveryProvider
}
} | [
0.05757245421409607,
0.4436807632446289,
0.20480014383792877,
0.4459886848926544,
-0.49902039766311646,
0.17160111665725708,
0.009305675514042377,
0.001747200614772737,
1.0572271347045898,
0.25798389315605164,
-0.34267616271972656,
-0.5202428698539734,
0.48517924547195435,
0.61188530921936... |
func WithSigningManager(signingManager core.SigningManager) SDKContextParams {
return func(ctx *Provider) {
ctx.signingManager = signingManager
}
} | [
-0.885189414024353,
0.3049066662788391,
0.6713792085647583,
0.3287782371044159,
-1.6194432973861694,
-0.2269248068332672,
-0.39491724967956543,
0.36934101581573486,
0.7853870391845703,
-0.04848757013678551,
-0.2651803493499756,
-0.8801078796386719,
-0.10184784978628159,
1.3285812139511108,... |
func WithIdentityManagerProvider(provider msp.IdentityManagerProvider) SDKContextParams {
return func(ctx *Provider) {
ctx.idMgmtProvider = provider
}
} | [
-0.7123451232910156,
-0.514122724533081,
0.2679922878742218,
0.030712995678186417,
-0.32978057861328125,
0.05272626504302025,
-0.004837342072278261,
-0.3040160834789276,
1.0307910442352295,
0.40951067209243774,
-0.6434532403945923,
-0.3885927200317383,
-0.22173453867435455,
0.8361811637878... |
func WithInfraProvider(infraProvider fab.InfraProvider) SDKContextParams {
return func(ctx *Provider) {
ctx.infraProvider = infraProvider
}
} | [
-0.8001161217689514,
0.6905661821365356,
0.27378469705581665,
0.3573855757713318,
-0.26452288031578064,
0.4992181360721588,
0.5483770966529846,
-0.0419086255133152,
-0.026759719476103783,
0.39428988099098206,
0.06381572037935257,
-0.06610395014286041,
-1.0400598049163818,
0.252807676792144... |
func WithChannelProvider(channelProvider fab.ChannelProvider) SDKContextParams {
return func(ctx *Provider) {
ctx.channelProvider = channelProvider
}
} | [
0.03387795761227608,
0.4738825857639313,
0.2192770391702652,
-0.05877421051263809,
-0.527877926826477,
0.34127989411354065,
-0.2819492816925049,
-0.45307493209838867,
0.9434671401977539,
0.5423446297645569,
0.023861875757575035,
0.5234317183494568,
0.11990183591842651,
0.07643207907676697,... |
func WithClientMetrics(cm *metrics.ClientMetrics) SDKContextParams {
return func(ctx *Provider) {
ctx.clientMetrics = cm
}
} | [
0.6865345239639282,
0.719071626663208,
0.2761270999908447,
-0.09784982353448868,
-1.0473284721374512,
0.33307313919067383,
0.40490958094596863,
-0.7842157483100891,
0.1971495896577835,
0.029101626947522163,
0.09085551649332047,
-0.049944113940000534,
-0.31539177894592285,
0.080354593694210... |
func NewProvider(params ...SDKContextParams) *Provider {
ctxProvider := Provider{}
for _, param := range params {
param(&ctxProvider)
}
return &ctxProvider
} | [
-0.4766138195991516,
0.4098649024963379,
0.25870266556739807,
1.3787838220596313,
-0.668732762336731,
0.3774072229862213,
-0.3831951916217804,
-0.36551547050476074,
0.5379412770271301,
0.22981329262256622,
0.41498446464538574,
-0.0013052474241703749,
-0.4863030016422272,
0.573623538017273,... |
func NewLocal(clientProvider context.ClientProvider) (*Local, error) {
client, err := clientProvider()
if err != nil {
return nil, errors.WithMessage(err, "failed to get client context to create local context")
}
discoveryService, err := client.LocalDiscoveryProvider().CreateLocalDiscoveryService(client.Identifi... | [
0.5323975682258606,
-0.5006446838378906,
0.6634541153907776,
0.08389870822429657,
-0.5934430360794067,
-0.0469091534614563,
0.5143983960151672,
0.22338221967220306,
0.7145921587944031,
0.08800004422664642,
-0.16424188017845154,
0.8595585823059082,
-0.5312349796295166,
0.2746817469596863,
... |
func NewChannel(clientProvider context.ClientProvider, channelID string) (*Channel, error) {
client, err := clientProvider()
if err != nil {
return nil, errors.WithMessage(err, "failed to get client context to create channel client")
}
channelService, err := client.ChannelProvider().ChannelService(client, chann... | [
0.35567381978034973,
0.03647327423095703,
0.07555397599935532,
-0.7089514136314392,
0.191563680768013,
0.3774479329586029,
0.05452979356050491,
-0.8972855806350708,
0.5583022236824036,
0.21024098992347717,
0.5370219945907593,
1.90469491481781,
-0.5362814664840698,
0.3688020706176758,
0.4... |
func WithTimeoutType(timeoutType fab.TimeoutType) ReqContextOptions {
return func(ctx *requestContextOpts) {
ctx.timeoutType = timeoutType
}
} | [
0.04269516468048096,
-0.45412391424179077,
0.4726369380950928,
0.635455846786499,
-0.08392232656478882,
0.10646181553602219,
-0.0417974554002285,
-0.41085970401763916,
1.4206621646881104,
0.3619718849658966,
0.29012277722358704,
-0.5969212055206299,
0.23615498840808868,
0.5495509505271912,... |
func WithTimeout(timeout time.Duration) ReqContextOptions {
return func(ctx *requestContextOpts) {
ctx.timeout = timeout
}
} | [
0.24836285412311554,
-0.4440428614616394,
0.5276817679405212,
0.7040510773658752,
0.06288431584835052,
0.49085572361946106,
-0.2003920078277588,
-0.3550127446651459,
1.4492051601409912,
-0.2558510899543762,
0.4788435101509094,
-0.0498637892305851,
0.28775379061698914,
-0.28493592143058777,... |
func WithParent(context reqContext.Context) ReqContextOptions {
return func(ctx *requestContextOpts) {
ctx.parentContext = context
}
} | [
0.25362521409988403,
-0.736766517162323,
0.6592362523078918,
0.020292863249778748,
-0.45516011118888855,
0.4456396698951721,
0.2092725783586502,
-1.386573314666748,
1.1231870651245117,
-1.1219841241836548,
0.45643824338912964,
-0.16028568148612976,
0.33309701085090637,
-0.5541227459907532,... |
func NewRequest(client context.Client, options ...ReqContextOptions) (reqContext.Context, reqContext.CancelFunc) {
//'-1' to get default config timeout when timeout options not passed
reqCtxOpts := requestContextOpts{timeoutType: -1}
for _, option := range options {
option(&reqCtxOpts)
}
parentContext := reqCt... | [
-0.07792961597442627,
-0.19605012238025665,
0.945155143737793,
0.6863994598388672,
-0.1845567524433136,
0.03802328184247017,
-0.01262793131172657,
0.19517900049686432,
0.618218719959259,
0.3281158208847046,
1.0091365575790405,
-0.015493501909077168,
-0.3375047743320465,
-0.4106095433235168... |
func RequestCommManager(ctx reqContext.Context) (fab.CommManager, bool) {
commManager, ok := ctx.Value(reqContextCommManager).(fab.CommManager)
return commManager, ok
} | [
-1.7011739015579224,
-0.13985244929790497,
0.7027630805969238,
-0.09199604392051697,
0.13272380828857422,
-0.3123045265674591,
-0.900906503200531,
-0.3888031542301178,
0.7192736864089966,
-1.0627878904342651,
0.4923834204673767,
0.2983265221118927,
-1.0687074661254883,
0.8993823528289795,
... |
func RequestClientContext(ctx reqContext.Context) (context.Client, bool) {
clientContext, ok := ctx.Value(reqContextClient).(context.Client)
return clientContext, ok
} | [
-0.6019509434700012,
-0.3818831741809845,
0.6649991869926453,
-0.1183108314871788,
-0.5740978717803955,
0.07683183252811432,
0.02272500842809677,
-0.8780600428581238,
0.959792971611023,
-0.0660877451300621,
-0.2873799204826355,
0.33297285437583923,
-0.5371124148368835,
-0.21071000397205353... |
func requestTimeoutOverride(ctx reqContext.Context, timeoutType fab.TimeoutType) time.Duration {
timeoutOverrides, ok := ctx.Value(ReqContextTimeoutOverrides).(map[fab.TimeoutType]time.Duration)
if !ok {
return 0
}
return timeoutOverrides[timeoutType]
} | [
-1.0427730083465576,
0.7244799137115479,
0.6049441695213318,
0.8844666481018066,
0.33140966296195984,
-0.4728211760520935,
-0.9004260301589966,
-0.4150157570838928,
0.4602341949939728,
-0.3081302344799042,
0.007666031830012798,
-0.5646724104881287,
-0.5256609320640564,
0.31767740845680237,... |
func GetLoadedPlugins() []IgluPlugin {
markCrashedPlugins()
return loadedPlugins
} | [
-0.5619981288909912,
-0.7169785499572754,
0.6367064714431763,
0.8028978109359741,
0.6647450923919678,
0.04332652688026428,
0.06813014298677444,
-0.9608033895492554,
0.9050030708312988,
-0.4871615171432495,
-2.010239601135254,
1.7531661987304688,
-0.936630368232727,
-0.8813670873641968,
0... |
func StopPlugin(id string) {
mutex.Lock()
defer mutex.Unlock()
for i, plugin := range loadedPlugins {
if plugin.Manifest.Id == id {
if !plugin.client.Exited() && plugin.State == Running {
plugin.client.Kill()
loadedPlugins[i].State = Stopped
}
}
}
} | [
-1.1700197458267212,
-2.256880521774292,
0.4974617063999176,
-0.9423002600669861,
0.23278801143169403,
0.3121955692768097,
-0.3165309727191925,
0.03285882994532585,
0.07472065091133118,
0.38143834471702576,
-1.0837074518203735,
0.9309831857681274,
-0.6552245020866394,
-0.4119260311126709,
... |
func StartPlugin(id string) {
mutex.Lock()
for i, plugin := range loadedPlugins {
if plugin.Manifest.Id == id {
file := plugin.Filename
if plugin.client.Exited() && plugin.State != Running {
loadedPlugins = append(loadedPlugins[:i], loadedPlugins[i+1:]...)
}
mutex.Unlock()
LoadPlugin(file)
ret... | [
-0.1982204169034958,
-1.912392497062683,
0.46156078577041626,
0.008297671563923359,
-0.05623932182788849,
-0.043143969029188156,
-0.0584246888756752,
0.5254269242286682,
0.27145543694496155,
0.17600682377815247,
-0.8476600050926208,
1.1791059970855713,
-0.5062118172645569,
0.21489496529102... |
func ReloadPlugin(id string) {
StopPlugin(id)
StartPlugin(id)
} | [
-0.7070425748825073,
-1.3546544313430786,
0.42320242524147034,
0.22987385094165802,
-0.02293194644153118,
-0.20420929789543152,
-0.2698476314544678,
0.18967819213867188,
0.45233777165412903,
0.3235208988189697,
-1.259110689163208,
1.3527182340621948,
-0.5541123151779175,
-0.629467010498046... |
func DeletePlugin(id string) {
mutex.Lock()
defer mutex.Unlock()
for i, plugin := range loadedPlugins {
if plugin.Manifest.Id == id {
if plugin.client != nil && plugin.client.Exited() {
plugin.client.Kill()
}
os.Remove("./plugins/" + plugin.Filename)
loadedPlugins = append(loadedPlugins[:i], loaded... | [
0.09575490653514862,
-1.7666094303131104,
0.5987875461578369,
-0.3810739815235138,
0.4181111752986908,
-0.2360159009695053,
-0.05284125357866287,
-0.16361048817634583,
0.7143614888191223,
-0.3504180312156677,
-0.680232584476471,
1.1981333494186401,
-0.6822354197502136,
0.37138035893440247,... |
func UnloadAllPlugins() {
mutex.Lock()
defer mutex.Unlock()
log.Println("Unloading plugins...")
for i, plugin := range loadedPlugins {
if plugin.client != nil && !plugin.client.Exited() {
plugin.client.Kill()
}
loadedPlugins[i].State = Stopped
}
log.Println("Plugins unloaded")
} | [
-0.14465904235839844,
-1.4405157566070557,
0.49904003739356995,
-0.3159897029399872,
0.7222743630409241,
-0.17646607756614685,
-0.2610885202884674,
-0.40354612469673157,
-0.06757206469774246,
0.497035413980484,
-0.3196849822998047,
0.7993597984313965,
-0.48157697916030884,
-0.4169336259365... |
func UnloadPlugin(id string) {
mutex.Lock()
defer mutex.Unlock()
for i, plugin := range loadedPlugins {
if plugin.client != nil {
plugin.client.Kill()
}
loadedPlugins[i].State = Stopped
return
}
} | [
-0.48075178265571594,
-1.2810240983963013,
0.550760805606842,
-1.2628036737442017,
0.3150556683540344,
-0.10536089539527893,
0.13854143023490906,
-0.21362300217151642,
0.17440162599086761,
0.26790833473205566,
-0.9522274136543274,
0.8771591186523438,
-0.9004209637641907,
-0.665275871753692... |
func GetPlugin(id string) (*IgluPlugin, error) {
mutex.Lock()
defer mutex.Unlock()
for i, plugin := range loadedPlugins {
if plugin.Manifest.Id == id {
if plugin.client != nil {
return &loadedPlugins[i], nil
}
}
}
return nil, errors.New("Plugin is not loaded")
} | [
-0.07677344232797623,
-1.1050355434417725,
0.7321960926055908,
-0.2138349860906601,
-0.20211976766586304,
-0.2623918950557709,
-0.29330140352249146,
-1.0633747577667236,
0.5319128632545471,
-0.28369665145874023,
-0.5647132992744446,
1.435721516609192,
-0.7836536765098572,
-0.49919894337654... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.