text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (rf *Raft) persist() { // Your code here (2C). // Example: // w := new(bytes.Buffer) // e := gob.NewEncoder(w) // e.Encode(rf.xxx) // e.Encode(rf.yyy) // data := w.Bytes() // rf.persister.SaveRaftState(data) }
[ 0.2440500110387802, 0.20504844188690186, 0.7210336923599243, 0.22793003916740417, 0.47031599283218384, 0.6232033967971802, 1.197713851928711, -0.2771352529525757, 0.28057047724723816, -0.6213681101799011, -1.392462968826294, -0.13795502483844757, -1.038998007774353, 0.5021166205406189, -...
func (rf *Raft) readPersist(data []byte) { // Your code here (2C). // Example: // r := bytes.NewBuffer(data) // d := gob.NewDecoder(r) // d.Decode(&rf.xxx) // d.Decode(&rf.yyy) if data == nil || len(data) < 1 { // bootstrap without any state? return } }
[ -0.32382404804229736, 0.021260399371385574, 0.7250837683677673, 0.9358000755310059, 0.1921267956495285, -0.03958725184202194, 0.41396692395210266, 0.6316553950309753, 0.557557225227356, -0.5584129095077515, 0.07672178000211716, -0.25839853286743164, -0.8620074987411499, 0.249738410115242, ...
func (rf *Raft) RequestVote(args *RequestVoteArgs, reply *RequestVoteReply) { // Your code here (2A, 2B). rf.mu.Lock() defer rf.mu.Unlock() if rf.currentTerm > args.Term { reply.VoteGranted = false reply.Term = rf.currentTerm return } if rf.currentTerm < args.Term { rf.currentTerm = args.Term rf.update...
[ -0.3142034411430359, -0.5725885033607483, 1.1138046979904175, 0.6921257376670837, 0.2036127895116806, -0.13556385040283203, 0.3600686192512512, -0.29658839106559753, -0.12594568729400635, -0.3197828531265259, 0.1915561854839325, 0.9880225658416748, -1.0150214433670044, 0.03249664604663849,...
func (rf *Raft) sendRequestVote(server int, args *RequestVoteArgs, reply *RequestVoteReply) bool { ok := rf.peers[server].Call("Raft.RequestVote", args, reply) return ok }
[ -1.7217257022857666, 0.6659510135650635, 0.8312348127365112, 0.7307031750679016, 0.17303933203220367, 0.21706810593605042, -0.9719288349151611, -0.5586418509483337, -0.4343738853931427, 0.06299328804016113, -0.05966845154762268, 0.571821928024292, -1.641867995262146, 0.05286068469285965, ...
func (rf *Raft) Start(command interface{}) (int, int, bool) { index := -1 term := -1 isLeader := false // Your code here (2B). if rf.status == LEADER { rf.mu.Lock() index = len(rf.logEntries) logEntry := LogEntry{Command: command, Term: rf.currentTerm} rf.logEntries = append(rf.logEntries, logEntry) rf....
[ -0.18465428054332733, -0.16285276412963867, 0.7046017050743103, 0.3722093999385834, 0.23642036318778992, -0.24337832629680634, 0.47036832571029663, 0.5700217485427856, -0.4269833564758301, 0.27519524097442627, -0.9631461501121521, 1.487882375717163, -0.41086989641189575, -0.102318309247493...
func (rf *Raft) Kill() { // Your code here, if desired. go func() { rf.stop <- struct{}{} }() }
[ 0.16878889501094818, -0.12402607500553131, 0.3818831741809845, 1.5423548221588135, 0.714542806148529, 0.3235194981098175, 0.7277717590332031, 0.22394971549510956, -0.46170908212661743, 0.1419903188943863, -0.5467969179153442, 0.7133064270019531, -0.5377007722854614, -0.003597696777433157, ...
func Make(peers []*labrpc.ClientEnd, me int, persister *Persister, applyCh chan ApplyMsg) *Raft { rf := &Raft{} rf.peers = peers rf.persister = persister rf.me = me //为了高可用需要存储在稳定介质中的数据 rf.votedFor = -1 rf.status = FOLLOWER rf.currentTerm = 0 rf.logEntries = make([]LogEntry, 0, 10) rf.logEntries = append(r...
[ 0.1833333820104599, -0.4471878707408905, 1.199232816696167, -0.06322667747735977, -0.23887963593006134, -0.38620296120643616, 0.5494590401649475, -0.28220242261886597, -0.4292150139808655, -0.6850985884666443, -0.41386160254478455, 0.22084063291549683, -0.1697605550289154, 0.25813645124435...
func NewCatalogTierPriceStorageV1ReplacePutParams() *CatalogTierPriceStorageV1ReplacePutParams { var () return &CatalogTierPriceStorageV1ReplacePutParams{ timeout: cr.DefaultTimeout, } }
[ -0.3349118232727051, -0.4035367965698242, 0.569727897644043, -0.26049405336380005, -0.4518807828426361, -0.5601726770401001, 0.0424472950398922, 1.1375590562820435, -0.9035865664482117, 0.9052017331123352, 0.1535097360610962, 0.1601073443889618, -0.6886143684387207, -0.7275300621986389, ...
func NewCatalogTierPriceStorageV1ReplacePutParamsWithTimeout(timeout time.Duration) *CatalogTierPriceStorageV1ReplacePutParams { var () return &CatalogTierPriceStorageV1ReplacePutParams{ timeout: timeout, } }
[ 0.39264845848083496, -0.4592854678630829, 0.6459572315216064, -0.09258990734815598, -0.6464366316795349, -0.10115104168653488, -0.5675284266471863, 0.9773834347724915, -0.9419077038764954, 1.5252668857574463, 0.20343229174613953, 0.378567099571228, -0.5439214706420898, -0.3122701644897461,...
func NewCatalogTierPriceStorageV1ReplacePutParamsWithContext(ctx context.Context) *CatalogTierPriceStorageV1ReplacePutParams { var () return &CatalogTierPriceStorageV1ReplacePutParams{ Context: ctx, } }
[ -0.08398953825235367, -0.2966294288635254, 0.7838345766067505, -0.4557785093784332, -0.47415125370025635, -0.09262549877166748, -0.19455385208129883, 0.38404375314712524, -0.5567485094070435, 1.1885733604431152, 0.11180104315280914, -0.003170483745634556, -0.6222641468048096, -1.0358350276...
func NewCatalogTierPriceStorageV1ReplacePutParamsWithHTTPClient(client *http.Client) *CatalogTierPriceStorageV1ReplacePutParams { var () return &CatalogTierPriceStorageV1ReplacePutParams{ HTTPClient: client, } }
[ -0.19158586859703064, -0.5338236689567566, 0.7592718601226807, -0.22085969150066376, -0.33488669991493225, -0.0828956887125969, 0.4402202069759369, 0.8735854029655457, -1.2554084062576294, 0.4780515730381012, -0.09329637140035629, 0.00939716026186943, -0.3947067856788635, -0.97622877359390...
func (o *CatalogTierPriceStorageV1ReplacePutParams) WithTimeout(timeout time.Duration) *CatalogTierPriceStorageV1ReplacePutParams { o.SetTimeout(timeout) return o }
[ 0.5071879029273987, 0.2021312266588211, 0.5249995589256287, -0.5382744073867798, -0.4765164256095886, -0.785591185092926, -0.41568124294281006, 0.8351510167121887, -0.07472746074199677, 1.383041262626648, 0.1611327826976776, 0.4330364763736725, 0.3266911804676056, -0.3337976634502411, 0....
func (o *CatalogTierPriceStorageV1ReplacePutParams) SetTimeout(timeout time.Duration) { o.timeout = timeout }
[ 0.04890945181250572, 0.33253300189971924, 0.4854087829589844, -0.5281491279602051, -0.16167432069778442, -0.116269551217556, -0.21253062784671783, 1.2147494554519653, -0.598598301410675, 1.2489475011825562, 0.2878011167049408, 0.6144801378250122, -0.3165668547153473, -0.2878117859363556, ...
func (o *CatalogTierPriceStorageV1ReplacePutParams) WithContext(ctx context.Context) *CatalogTierPriceStorageV1ReplacePutParams { o.SetContext(ctx) return o }
[ 0.005457171238958836, 0.1893424391746521, 0.5382497310638428, -0.6733118295669556, -0.2907237708568573, -0.6323527693748474, -0.7751870155334473, 0.3680855333805084, 0.1640579104423523, 0.9160924553871155, -0.08414927870035172, 0.30921193957328796, -0.22555780410766602, -0.8694896101951599...
func (o *CatalogTierPriceStorageV1ReplacePutParams) SetContext(ctx context.Context) { o.Context = ctx }
[ -0.2613183557987213, 0.40597003698349, 0.42402392625808716, -0.3907918930053711, 0.031057316809892654, -0.14673969149589539, -0.40417584776878357, 0.6986016035079956, 0.07505921274423599, 0.6827524900436401, -0.09795742481946945, 0.6007715463638306, -0.6139692068099976, -0.680210292339325,...
func (o *CatalogTierPriceStorageV1ReplacePutParams) WithHTTPClient(client *http.Client) *CatalogTierPriceStorageV1ReplacePutParams { o.SetHTTPClient(client) return o }
[ 0.10431389510631561, -0.6748002767562866, 0.6219005584716797, -0.6422764658927917, -0.3093261122703552, -0.8134014010429382, 0.19971592724323273, 0.2711305320262909, -0.7866836190223694, 0.21606050431728363, 0.059587761759757996, 0.08219809085130692, 0.3534174859523773, -1.1006101369857788...
func (o *CatalogTierPriceStorageV1ReplacePutParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client }
[ 0.34579357504844666, -0.3347759246826172, 0.4195517301559448, -0.9342343211174011, -0.3483441174030304, -0.6330207586288452, 0.27897244691848755, 0.509575605392456, -1.2311540842056274, 0.35961490869522095, -0.25883254408836365, 0.6074058413505554, -0.222573384642601, -0.8880088329315186, ...
func (o *CatalogTierPriceStorageV1ReplacePutParams) WithCatalogTierPriceStorageV1ReplacePutBody(catalogTierPriceStorageV1ReplacePutBody CatalogTierPriceStorageV1ReplacePutBody) *CatalogTierPriceStorageV1ReplacePutParams { o.SetCatalogTierPriceStorageV1ReplacePutBody(catalogTierPriceStorageV1ReplacePutBody) return o }
[ -0.4378242492675781, -0.39979544281959534, 0.7351136207580566, -0.3336747884750366, -0.36024120450019836, -0.4499763250350952, 0.0242701917886734, 0.7263718247413635, 0.23917663097381592, 1.0117859840393066, -0.013647687621414661, -0.40187180042266846, 0.10053645074367523, -0.9039312005043...
func (o *CatalogTierPriceStorageV1ReplacePutParams) SetCatalogTierPriceStorageV1ReplacePutBody(catalogTierPriceStorageV1ReplacePutBody CatalogTierPriceStorageV1ReplacePutBody) { o.CatalogTierPriceStorageV1ReplacePutBody = catalogTierPriceStorageV1ReplacePutBody }
[ -0.5893862843513489, -0.2709078788757324, 0.8468555808067322, -0.6698639392852783, -0.22869955003261566, -0.09347639232873917, 0.06173595041036606, 0.674039363861084, -0.06415960937738419, 1.0538325309753418, -0.34527361392974854, -0.1892746388912201, -0.30219268798828125, -0.8904244303703...
func (o *CatalogTierPriceStorageV1ReplacePutParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if err := r.SetBodyParam(o.CatalogTierPriceStorageV1ReplacePutBody); err != nil { return err } if len(res) > ...
[ -0.9506158828735352, -0.0376424565911293, 0.7347500920295715, -0.7656062841415405, 0.8098211288452148, -0.5061218738555908, 0.6511375904083252, 0.3532566428184509, -0.5167939066886902, 0.8089357018470764, 0.24238111078739166, 0.40761661529541016, -0.5765549540519714, -0.32854148745536804, ...
func NewPrivilegedSignupStatusItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedSignupStatusItemRequestBuilder) { m := &PrivilegedSignupStatusItemRequestBuilder{ BaseRequestBuilder: *i2ae41...
[ -0.4320050776004791, -0.36151328682899475, 0.7401902675628662, 0.2894710600376129, -0.6445966958999634, 1.2088768482208252, -0.058730367571115494, 0.837921679019928, -0.36220553517341614, -1.0123257637023926, -0.1549496352672577, 0.15989436209201813, -0.7669333219528198, 0.0567685589194297...
func NewPrivilegedSignupStatusItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedSignupStatusItemRequestBuilder) { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl return NewPrivilegedSignupS...
[ -0.9080566763877869, -0.18967445194721222, 0.4621219038963318, 1.1984775066375732, -0.6767221689224243, 0.9303229451179504, -0.613173246383667, 0.9441503286361694, 0.4332476854324341, -1.4910297393798828, -0.2733100354671478, -0.1580081433057785, 0.038576640188694, 0.1803087294101715, 0....
func (m *PrivilegedSignupStatusItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *PrivilegedSignupStatusItemRequestBuilderDeleteRequestConfiguration)(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if err != nil { return err } errorMapping...
[ -0.10379720479249954, -0.06757393479347229, 0.8977318406105042, 0.21959999203681946, 0.005696353502571583, 0.6831873059272766, 0.038714516907930374, 0.5963133573532104, 0.14082692563533783, -0.12259365618228912, 0.31794217228889465, -0.17270365357398987, -0.37968841195106506, 0.18166990578...
func (m *PrivilegedSignupStatusItemRequestBuilder) Get(ctx context.Context, requestConfiguration *PrivilegedSignupStatusItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PrivilegedSignupStatusable, error) { requestInfo, err := m.ToGetRequestInformation(ctx,...
[ -0.46869245171546936, 0.11121126264333725, 0.9154579639434814, -0.6020625233650208, -0.1634489893913269, 0.5066750049591064, -0.0709344819188118, 0.36634182929992676, -0.3827827274799347, -0.19142232835292816, 0.01310791540890932, 0.26734888553619385, -0.18292835354804993, 0.00859029870480...
func (m *PrivilegedSignupStatusItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PrivilegedSignupStatusable, requestConfiguration *PrivilegedSignupStatusItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f...
[ -0.45400694012641907, -0.38436976075172424, 0.8666530847549438, -0.6604541540145874, -0.939100980758667, 0.9525802731513977, -0.047212887555360794, 0.7505336999893188, 0.3413999080657959, 0.005997138097882271, -0.018063826486468315, 0.23419319093227386, 0.20160287618637085, 0.2628878653049...
func (m *PrivilegedSignupStatusItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *PrivilegedSignupStatusItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee26...
[ -0.5341994762420654, -0.4528674781322479, 1.0650054216384888, -0.8297275304794312, -0.19900836050510406, 0.31498000025749207, -0.3832273483276367, 0.44899114966392517, 0.24370478093624115, -0.3879217207431793, 0.25801724195480347, -0.08559375256299973, -0.22658184170722961, 0.0000919088925...
func (m *PrivilegedSignupStatusItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PrivilegedSignupStatusItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb...
[ -1.1164393424987793, -0.1811671257019043, 1.0014575719833374, -0.5186722278594971, 0.046123795211315155, 0.10324864089488983, -0.36150604486465454, 0.04611162468791008, -0.0003433302044868469, -0.4302184581756592, 0.10174210369586945, -0.013544532470405102, -0.4188057780265808, -0.07491435...
func (m *PrivilegedSignupStatusItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PrivilegedSignupStatusable, requestConfiguration *PrivilegedSignupStatusItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df6398...
[ -0.887296736240387, -0.56443852186203, 1.134210467338562, -0.8612969517707825, -0.594562828540802, 0.35262346267700195, 0.006648808717727661, -0.1426657885313034, -0.35584285855293274, 0.15701311826705933, 0.5184825658798218, -0.24976907670497894, -0.30354905128479004, -0.30149945616722107...
func typhaAutoscalerPeriod(syncPeriod time.Duration) typhaAutoscalerOption { return func(t *typhaAutoscaler) { t.syncPeriod = syncPeriod } }
[ 0.1805054396390915, -0.5567348003387451, 0.6095463037490845, -0.11647094786167145, -0.40438851714134216, 0.8179137110710144, 0.2966787815093994, -0.17199960350990295, -0.19701552391052246, 0.5007182359695435, -0.2559676766395569, 0.2976996600627899, 0.5534038543701172, 0.21845543384552002,...
func newTyphaAutoscaler(client client.Client, options ...typhaAutoscalerOption) *typhaAutoscaler { ta := new(typhaAutoscaler) ta.client = client ta.syncPeriod = defaultTyphaAutoscalerSyncPeriod for _, option := range options { option(ta) } return ta }
[ -0.17372804880142212, -0.5626991391181946, 0.6025149822235107, -0.7128297686576843, -0.32439225912094116, 0.11232427507638931, -0.38029059767723083, -0.552335798740387, -0.6834104657173157, -0.060366883873939514, -1.0179634094238281, 0.5742502808570862, -0.17858941853046417, 0.610685408115...
func (t *typhaAutoscaler) getExpectedReplicas(nodes int) int { switch { case nodes <= 1: return 1 case nodes <= 2: return 2 case nodes <= 3: return 3 case nodes <= 250: return 4 case nodes <= 500: return 5 case nodes <= 1000: return 6 case nodes <= 1500: return 7 case nodes <= 2000: return 8 }...
[ -1.5067384243011475, 0.38937413692474365, 0.6180819272994995, -0.7075931429862976, -0.3608107566833496, -0.4679410457611084, 0.473869651556015, 0.31415969133377075, 0.13826315104961395, 0.6678948402404785, -0.19716718792915344, 1.061583399772644, 0.07854913920164108, 0.10243773460388184, ...
func (t *typhaAutoscaler) run() { ticker := time.NewTicker(t.syncPeriod) go func() { for { select { case <-ticker.C: expectedNodes, err := t.getNumberOfNodes() if err != nil { typhaLog.Error(err, "Could not get number of nodes") continue } expectedReplicas := t.getExpectedReplicas(ex...
[ -1.0751720666885376, -0.06692229956388474, 0.6403815150260925, -0.6474140286445618, 0.6828845739364624, 0.1847105175256729, 0.8375367522239685, 0.19289179146289825, -0.9577801823616028, 1.1896206140518188, -0.3603097200393677, 0.8324828743934631, 0.36588233709335327, 0.6565126180648804, ...
func (t *typhaAutoscaler) updateReplicas(expectedReplicas int32) error { key := types.NamespacedName{Namespace: common.CalicoNamespace, Name: common.TyphaDeploymentName} typha := &appsv1.Deployment{} err := t.client.Get(context.Background(), key, typha) if err != nil { return err } // The replicas field defaul...
[ -1.575649380683899, 0.012281659990549088, 0.40782415866851807, -0.6992749571800232, -0.568946123123169, 0.2649211585521698, -0.06015990674495697, -0.11385886371135712, 0.2106727659702301, 0.9042885303497314, 0.03367874026298523, 0.7449305653572083, -0.4352926015853882, 0.06332673877477646,...
func (t *typhaAutoscaler) getNumberOfNodes() (int, error) { nodes := corev1.NodeList{} err := t.client.List(context.Background(), &nodes) if err != nil { return 0, err } schedulable := 0 for _, n := range nodes.Items { if !n.Spec.Unschedulable { schedulable++ } } return schedulable, nil }
[ -0.6803454756736755, 0.8509877920150757, 0.6355183124542236, -0.25243884325027466, 0.40260741114616394, -0.7589928507804871, 0.10658054053783417, 0.3468339443206787, -0.5895927548408508, 0.5491223931312561, -0.751010537147522, 0.4099346399307251, -0.13084664940834045, 0.18405279517173767, ...
func (c *Configuration) Get(name string) (string, error) { v, ok := c.data[name].(string) if !ok { return "", errors.New(fmt.Sprintf("no existe el campo %s o no se puede convertir en string", name)) } return v, nil }
[ -1.2903099060058594, -0.22895334661006927, 0.6275901794433594, -0.9155049324035645, -0.5738722085952759, 0.16750434041023254, -1.3915431499481201, -0.9457217454910278, -0.7304803729057312, 0.9447965621948242, -0.07160261273384094, 0.14237061142921448, -0.6217260956764221, -0.35537940263748...
func (c *Configuration) GetInt(name string) (int, error) { v, ok := c.data[name].(float64) if !ok { return 0, errors.New(fmt.Sprintf("no existe el campo %s o no se puede convertir en int", name)) } return int(v), nil }
[ -0.38658377528190613, 0.5996015071868896, 0.8100965619087219, -0.4422019422054291, -0.22385534644126892, -0.19647425413131714, -0.5696765780448914, -0.7773022651672363, -1.3608568906784058, 0.771490752696991, -0.0972469225525856, -0.37194937467575073, -1.0286864042282104, 0.032326932996511...
func (c *Configuration) GetFloat(name string) (float64, error) { v, ok := c.data[name].(float64) if !ok { return 0, errors.New(fmt.Sprintf("no existe el campo %s o no se puede convertir en float64", name)) } return v, nil }
[ -0.47780826687812805, 0.8495150208473206, 0.6127561926841736, 0.30360138416290283, 0.5416432619094849, -0.40635764598846436, -0.5877543091773987, -0.4532431662082672, -0.5814086198806763, -0.042116306722164154, 0.11021297425031662, -0.41819754242897034, -0.7281503677368164, 0.6520202159881...
func (c *Configuration) GetBool(name string) (bool, error) { v, ok := c.data[name].(bool) if !ok { return false, errors.New(fmt.Sprintf("no existe el campo %s o no se puede convertir en bool", name)) } return v, nil }
[ -0.6438665390014648, 0.370186984539032, 0.7785888910293579, 0.26463305950164795, 0.14011429250240326, 0.6000676155090332, -0.49552688002586365, -0.4507848620414734, -0.4726385474205017, 1.281280517578125, -0.5018889904022217, 0.12873588502407074, -0.40004822611808777, -0.5400757789611816, ...
func (c *Configuration) GetSliceString(name string) ([]string, error) { ss := make([]string, 0) vs, ok := c.data[name].([]interface{}) if !ok { return nil, errors.New(fmt.Sprintf("no existe el campo %s", name)) } for _, v := range vs { s, ok := v.(string) if !ok { return nil, errors.New(fmt.Sprintf("el ...
[ -0.9834944605827332, -0.1653122454881668, 0.8646072149276733, 0.2804945707321167, 0.19787773489952087, -0.6087291836738586, -0.9190405011177063, -0.816887378692627, -0.4694608151912689, 1.6052649021148682, 0.20108067989349365, 0.46356838941574097, -0.7169563174247742, 0.6327679753303528, ...
func genTemplate(w http.ResponseWriter, tmpt string, p *Page) { t, _ := template.ParseFiles("templates/" + tmpt + ".html") t.Execute(w, p) }
[ -0.23653514683246613, 0.49564099311828613, 0.5536077618598938, -0.0499429814517498, 0.4528755247592926, 0.42251506447792053, 0.08579494059085846, 0.6592208743095398, -0.6491905450820923, 0.10144331306219101, -0.18949608504772186, -1.246511459350586, -0.3874604403972626, 0.1804213970899582,...
func indexHandler(w http.ResponseWriter, r *http.Request) { session, _ := store.Get(r, "session-name") var fname, lname, email string var id int64 if _, ok := session.Values["id"].(int64); ok { fname = session.Values["fname"].(string) lname = session.Values["lname"].(string) email = session.Values["email"]....
[ -0.3296912610530853, -0.334231436252594, 0.5746649503707886, -0.12337940186262131, -0.12409412860870361, 0.5769028067588806, 0.8893232941627502, 0.4353921115398407, 0.5584555864334106, 0.1712522804737091, 0.20417581498622894, -0.2917986512184143, -1.2283278703689575, -0.696879506111145, ...
func accountHandler(w http.ResponseWriter, r *http.Request) { session, _ := store.Get(r, "session-name") var fname, lname, email string var id int64 if _, ok := session.Values["id"].(int64); ok { fname = session.Values["fname"].(string) lname = session.Values["lname"].(string) email = session.Values["email"...
[ -0.4151938855648041, -0.378272145986557, 0.6249454021453857, 0.28720152378082275, 0.11271101981401443, 0.6226316690444946, 1.3164515495300293, 0.47708261013031006, 0.7555668950080872, 0.024955596774816513, 0.8362085819244385, -0.2824089825153351, -0.25802090764045715, -0.08532249182462692,...
func singleHandler(path string, fname string) { http.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, fname) }) }
[ -0.050087884068489075, -0.7003246545791626, 0.4748561978340149, 0.5284785628318787, -0.2452085018157959, 1.155600666999817, 1.2465910911560059, 0.8839263916015625, -0.6336739659309387, -0.6471249461174011, 0.28399205207824707, -0.5277500748634338, 0.15047740936279297, -0.1480506956577301, ...
func signupHandler(w http.ResponseWriter, r *http.Request) { r.ParseForm() fname := r.FormValue("fname") lname := r.FormValue("lname") email := r.FormValue("email") if r.FormValue("pword") != r.FormValue("pword2") { http.Redirect(w, r, "/", http.StatusFound) } pword := r.FormValue("pword") hword, err := bc...
[ -0.705369770526886, 0.06937529891729355, 0.799164891242981, 0.055025678128004074, 0.2633892893791199, 0.8740434646606445, 0.6962048411369324, 0.5617136359214783, -0.16860133409500122, 0.43620437383651733, 0.10332898050546646, -1.0481030941009521, -1.1020352840423584, -0.2381020039319992, ...
func NewClient(ctx context.Context, projectID string, sensor instana.TracerLogger, opts ...option.ClientOption) (*Client, error) { c, err := pubsub.NewClient(ctx, projectID, opts...) return &Client{c, projectID, sensor}, err }
[ 1.1492066383361816, 0.5773472785949707, 0.3070196807384491, 0.09736072272062302, -0.14044633507728577, 0.8555395007133484, 0.45683029294013977, -0.8927762508392334, 0.3338102102279663, -0.5865823030471802, 0.18842650949954987, 0.5103852152824402, -0.5350186228752136, -0.5364059209823608, ...
func (c *Client) CreateTopic(ctx context.Context, id string) (*Topic, error) { top, err := c.Client.CreateTopic(ctx, id) return &Topic{top, c.projectID, c.sensor}, err }
[ 0.07498730719089508, 0.5600305795669556, 0.13808783888816833, -0.12118950486183167, 0.2697954475879669, 0.82810378074646, -0.4980315566062927, -1.0445103645324707, 0.2850005328655243, -0.6557671427726746, 0.2251102179288864, 0.19580744206905365, -0.5508691668510437, -0.36404120922088623, ...
func (c *Client) CreateTopicWithConfig(ctx context.Context, topicID string, tc *pubsub.TopicConfig) (*Topic, error) { top, err := c.Client.CreateTopicWithConfig(ctx, topicID, tc) return &Topic{top, c.projectID, c.sensor}, err }
[ 0.4472898244857788, -0.06619121134281158, 0.010812017135322094, -0.28896278142929077, 0.19106805324554443, 0.8289012908935547, -0.7021238207817078, -1.0090761184692383, 0.005211805459111929, 0.08979419618844986, -0.3285963535308838, -0.39366263151168823, -0.025126952677965164, 0.3259516656...
func (c *Client) Topic(id string) *Topic { return &Topic{c.Client.Topic(id), c.projectID, c.sensor} }
[ 0.1461862474679947, 0.20427969098091125, -0.08979274332523346, -0.20733095705509186, -0.14930181205272675, 0.4932718873023987, -0.6829324960708618, -0.6179996132850647, 0.22812800109386444, -1.0124261379241943, 0.7688161730766296, 0.6035309433937073, -0.05445166677236557, -0.82155591249465...
func (c *Client) TopicInProject(id, projectID string) *Topic { return &Topic{c.Client.TopicInProject(id, projectID), projectID, c.sensor} }
[ 0.7071590423583984, -0.40911635756492615, 0.04371979460120201, -0.13023655116558075, -0.578537106513977, 0.6892342567443848, -0.6985971331596375, -0.8962451815605164, -0.5980677008628845, 0.02378503605723381, 1.2685399055480957, 0.6016676425933838, -0.7773728370666504, -0.5901390314102173,...
func (c *Client) Topics(ctx context.Context) *TopicIterator { return &TopicIterator{c.Client.Topics(ctx), c.projectID, c.sensor} }
[ -0.08051545172929764, -0.23978842794895172, -0.04439066722989082, -0.8174798488616943, 0.05755796283483505, 0.6616690158843994, -0.7832456231117249, -1.1091947555541992, 0.2577390968799591, -1.0037102699279785, 1.3427870273590088, 0.4937145411968231, -0.32554879784584045, -0.09493027627468...
func (c *Client) CreateSubscription(ctx context.Context, id string, cfg pubsub.SubscriptionConfig) (*Subscription, error) { sub, err := c.Client.CreateSubscription(ctx, id, cfg) return &Subscription{sub, c.projectID, c.sensor}, err }
[ 0.42046281695365906, 0.3082544803619385, 0.09234990924596786, 0.30617982149124146, 0.0020078837405890226, 0.44524946808815, -0.678141713142395, -0.6305018067359924, 0.19540737569332123, -0.5043262839317322, -0.7727560997009277, -0.047493595629930496, -0.9407554864883423, 0.2716809809207916...
func (c *Client) Subscription(id string) *Subscription { return &Subscription{c.Client.Subscription(id), c.projectID, c.sensor} }
[ 0.44177335500717163, -0.2314419448375702, 0.036613646894693375, 0.0807732567191124, -0.7100571393966675, -0.05698543041944504, -0.5983538031578064, -1.1697328090667725, 0.5638760328292847, -1.2358968257904053, -0.6342114806175232, 0.5354714393615723, -0.01851625181734562, -0.46940955519676...
func (c *Client) SubscriptionInProject(id, projectID string) *Subscription { return &Subscription{c.Client.SubscriptionInProject(id, projectID), projectID, c.sensor} }
[ 0.9193758368492126, -0.35617297887802124, 0.2504630386829376, 0.5033420920372009, -0.8395981788635254, 0.3193231225013733, -0.6896860003471375, -1.2264366149902344, -0.25227707624435425, -0.17401735484600067, 0.052645646035671234, 0.39847835898399353, -0.6960157752037048, -0.43123829364776...
func (c *Client) Subscriptions(ctx context.Context) *SubscriptionIterator { return &SubscriptionIterator{c.Client.Subscriptions(ctx), c.projectID, c.sensor} }
[ 0.35514864325523376, 0.07075243443250656, 0.12130922079086304, -0.13246417045593262, -0.15261083841323853, -0.024384498596191406, -0.7315461039543152, -1.1973276138305664, 0.24648039042949677, -0.8367041349411011, 0.832492470741272, 1.0670548677444458, -0.35397133231163025, -0.142446815967...
func (o *ProjectProjectActivityGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewProjectProjectActivityGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } ...
[ -0.12448988109827042, -1.0473828315734863, 0.36948370933532715, 0.7416104078292847, 0.1007845476269722, -0.31186822056770325, 0.19989317655563354, -0.3506505787372589, 0.15274354815483093, 0.14032240211963654, 1.2156625986099243, -0.64055997133255, -1.227349042892456, -1.1509672403335571, ...
func NewProjectProjectActivityGetOK() *ProjectProjectActivityGetOK { return &ProjectProjectActivityGetOK{} }
[ 0.630688488483429, -1.1863014698028564, 0.058063115924596786, 1.285612940788269, -0.07315964251756668, 1.0991435050964355, 0.833398699760437, -0.6250145435333252, -0.6065912842750549, 0.3567311465740204, 0.12127800285816193, -1.0397485494613647, -0.013765671290457249, -1.572319507598877, ...
func SleepTicks(d TimeUnit) { timerSleep(uint64(d)) }
[ 0.011214862577617168, 0.9687575101852417, 0.22977368533611298, 0.049112237989902496, -0.7370490431785583, 0.5612783432006836, 0.7823340892791748, -1.2816964387893677, 0.2559981346130371, -0.9831547737121582, -0.15944398939609528, -0.1149732694029808, -0.7364161014556885, -0.196093425154685...
func Ticks() TimeUnit { return tickMS * TickMicros }
[ 0.3062634766101837, 0.7993309497833252, 0.17868399620056152, -0.4341173768043518, -0.7500359416007996, -0.4204280376434326, 0.0002377563068876043, -0.39804232120513916, 0.12272272258996964, -0.5229077935218811, -0.19983863830566406, 0.10372722148895264, -0.7761464715003967, -0.677735626697...
func (e *Election) updateCurrentVote(new *messages.LeaderLevelMessage) { new.VolunteerPriority = e.GetVolunteerPriority(new.VolunteerMessage.Signer) // Add to display, add the previous vote e.executeDisplay(new) if e.CurrentVote.Rank >= 0 { prev := e.CurrentVote.Copy() prev.Justification = []messages.LeaderLeve...
[ -0.019340479746460915, -1.468102216720581, 0.7447873950004578, -0.010849015787243843, -0.3443322479724884, 0.33400264382362366, 0.0948183611035347, 0.6303837895393372, -0.16745693981647491, 1.2429728507995605, 0.6922541856765747, 0.5767125487327576, -1.0065443515777588, 1.1158522367477417,...
func (e *Election) addVote(vote *messages.VoteMessage) bool { if vote == nil { // Can never be too sure return false } vol := vote.Volunteer.Signer if e.VolunteerVotes[vol] == nil { e.VolunteerVotes[vol] = make(map[Identity]*messages.VoteMessage) } // Already seen this vote if _, ok := e.VolunteerVotes[vo...
[ -0.23777379095554352, -0.10735269635915756, 0.9256178140640259, 0.263680636882782, 0.5048092603683472, 0.3274388611316681, -0.5315149426460266, 0.1172139048576355, 0.41605329513549805, 0.5600134134292603, 0.2138785421848297, -0.3327607810497284, -0.9685773253440857, 0.8039559125900269, -...
func (e *Election) getRank0Vote() *messages.LeaderLevelMessage { // If we have a rank 1+, we will not issue a rank 0 if e.CurrentVote.Rank > 0 { return nil } // Assume sorted auds := e.GetAuds() // currentVote is -1. Updates when we get a rank 0 for _, vol := range auds { if len(e.VolunteerVotes[vol]) >= e...
[ 0.04114116355776787, -0.8081228733062744, 0.6591945290565491, -0.4517880380153656, 0.6285617351531982, -0.37340089678764343, -0.4675096571445465, -0.15117260813713074, 0.729747474193573, -0.08553283661603928, 1.0784035921096802, 0.9159690737724304, -0.8058473467826843, 1.0379096269607544, ...
func (e *Election) executeDisplay(msg imessage.IMessage) { if e.Display != nil { e.Display.Execute(msg) } }
[ 0.2572021484375, -0.42434507608413696, 0.5617687702178955, 0.1280253678560257, 0.440475195646286, 0.5171777606010437, 0.028985245153307915, -0.19897429645061493, 0.5804904103279114, 1.1742912530899048, 0.7825934886932373, -0.2642063498497009, -0.7952874898910522, 1.061396837234497, 0.119...
func (e *Election) executeLeaderLevelMessage(msg *messages.LeaderLevelMessage) (imessage.IMessage, bool) { // Add all messages to display and volunteer controllers. Then choose our best vote change := e.addLeaderLevelMessage(msg) for _, j := range msg.Justification { change = e.addLeaderLevelMessage(&j) || change ...
[ -0.16276395320892334, -0.6515496373176575, 0.8871495127677917, -0.21946467459201813, 0.20164716243743896, 0.011485720984637737, -0.2620506286621094, -0.11978530883789062, 0.32143718004226685, 0.9141147136688232, 0.2209710031747818, 0.06894510984420776, -1.4196854829788208, 0.79016697406768...
func (e *Election) addLeaderLevelMessage(msg *messages.LeaderLevelMessage) bool { if msg.Level <= 0 { panic("level <= 0 should never happen") } // Volunteer Control keeps the highest votes for each volunteer for each leader if e.VolunteerControls[msg.VolunteerMessage.Signer] == nil { e.VolunteerControls[msg.Vo...
[ -0.4802054166793823, -0.4441481828689575, 0.8084515333175659, -0.500079333782196, 0.5321348905563354, 0.3059977889060974, -0.22515378892421722, -0.22777651250362396, 0.6635059118270874, 0.21006405353546143, 0.07730010896921158, -0.41645902395248413, -1.4574003219604492, 1.307984471321106, ...
func (e *Election) commitIfLast(msg *messages.LeaderLevelMessage) *messages.LeaderLevelMessage { // If commit is true, then we are done. Return the EOM // commit := e.CommitmentIndicator.ShouldICommit(msg) if e.CommitmentTally > 3 { //commit { e.Committed = true msg.Committed = true msg.EOMFrom = e.Self e.ex...
[ 0.2575778365135193, -0.1462215632200241, 0.7553094625473022, -0.6241316795349121, 0.4359627366065979, 0.05818098038434982, 0.15155290067195892, -0.05051449313759804, 0.5333012342453003, 1.5254374742507935, 0.8086814880371094, -0.5270876288414001, -1.1835905313491821, 0.4793332815170288, ...
func (e *Election) PrintMessages() string { str := fmt.Sprintf("-- In -- (%p)\n", e.MsgListIn) for i, m := range e.MsgListIn { if m.Msg != nil { str += fmt.Sprintf("%d Depth:%d %s\n", i, m.Depth, e.Display.FormatMessage(m.Msg)) } else if m.VoteMsg != nil { str += fmt.Sprintf("%d Depth:%d %s\n", i, m.Depth, ...
[ -0.27539217472076416, -0.8191434741020203, 0.7672725915908813, -0.9484818577766418, 0.016280069947242737, 0.15742971003055573, -0.1621912568807602, -0.7544670104980469, -0.5573425889015198, 0.6339605450630188, 0.6788126230239868, 0.4453137516975403, -0.9120587706565857, 1.1885737180709839,...
func (e *Election) AddDisplay(global *Display) *Display { e.Display = NewDisplay(e, global) return e.Display }
[ -0.2071429044008255, -0.20004120469093323, 0.5647037029266357, 0.43586838245391846, -0.9191985130310059, 0.6986965537071228, -0.5930345058441162, -0.1520659476518631, 0.8227143287658691, -0.10408658534288406, 0.17173786461353302, -0.09901738911867142, -0.8777376413345337, 0.855056464672088...
func (c *Command) Name() string { name := c.UsageLine i := strings.Index(name, " ") if i >= 0 { name = name[:i] } return name }
[ -0.13944458961486816, -0.5175711512565613, 0.6349389553070068, 0.21111983060836792, 0.25094953179359436, -0.39678263664245605, 0.25263094902038574, -0.2723640501499176, -0.4689963757991791, 0.9186305999755859, 0.10354667156934738, 0.005619083996862173, -0.5711734294891357, 0.13793329894542...
func (c *Command) SetOutput(output io.Writer) { c.output = &output }
[ 0.4725939631462097, 0.13802313804626465, -0.23710569739341736, 0.2063540518283844, 0.11709223687648773, -0.33263325691223145, 0.7868736982345581, 0.257167786359787, -0.48011013865470886, -0.8224949836730957, -0.5009393692016602, -0.007706712000072002, -0.4037023186683655, 0.905906438827514...
func (c *Command) Out() io.Writer { if c.output != nil { return *c.output } return color.NewColorWriter(os.Stderr) }
[ 0.8960855007171631, -0.10956234484910965, 0.43146830797195435, -0.4174066483974457, 0.0498805046081543, -0.5079892873764038, 0.12447371333837509, -0.11574027687311172, -0.09897797554731369, -0.24378886818885803, 1.2038100957870483, 0.8331165909767151, -0.01003687921911478, 0.87067669630050...
func (c *Command) Usage() { tool.TmplTextParseAndOutput(cmdUsage, c) os.Exit(2) }
[ 0.09364250302314758, -0.669722318649292, 0.4152180552482605, -0.33687150478363037, -0.05480154976248741, -0.06939372420310974, 1.3162974119186401, -0.051962897181510925, -0.5514918565750122, -0.12434332072734833, 0.46127012372016907, 0.7181934714317322, 0.3688811957836151, 1.33159458637237...
func (c *Command) Runnable() bool { return c.Run != nil }
[ 0.05361481383442879, -0.3398963212966919, 0.5033512115478516, 0.4924675524234772, 0.29157915711402893, 0.0014795181341469288, -0.7168852090835571, 0.3447398841381073, -1.142046570777893, -0.5165903568267822, -1.149093508720398, -0.1957806944847107, -1.0952681303024292, 0.14175158739089966,...
func (c *Command) Options() map[string]string { options := make(map[string]string) c.Flag.VisitAll(func(f *flag.Flag) { defaultVal := f.DefValue if len(defaultVal) > 0 { options[f.Name+"="+defaultVal] = f.Usage } else { options[f.Name] = f.Usage } }) return options }
[ -0.6180882453918457, 0.47727489471435547, 0.5207003951072693, 0.02294280007481575, 0.846725583076477, -0.28137853741645813, -0.5842808485031128, -0.56087726354599, -0.8054066896438599, 0.6877802610397339, -0.16531780362129211, -0.33842554688453674, 0.3150109052658081, 1.3755316734313965, ...
func (v *DCHttpResponse) GetRawResponse() *http.Response { return v.Raw }
[ -0.20213568210601807, 0.18956789374351501, 0.42297646403312683, -0.0931551456451416, -0.6484191417694092, -0.15475605428218842, -0.11020997166633606, -0.8168935775756836, 0.8291820883750916, -1.3062918186187744, -0.7047724723815918, -0.2886885404586792, -0.337360680103302, -0.2698203027248...
func (v *DCHttpResponse) cacheBodyToMemory() { if !v.Raw.Close { v.body, v.bodyErr = ioutil.ReadAll(v.Raw.Body) _ = v.Raw.Body.Close() } }
[ -0.7555796504020691, -0.2755225598812103, 0.4573255181312561, -0.6688046455383301, -0.4454430639743805, 0.2892299294471741, -0.2893456518650055, -0.7584362030029297, 1.0955007076263428, -0.39132311940193176, -0.35104721784591675, 0.170525461435318, -0.5697005987167358, 0.6210120320320129, ...
func (v *DCHttpResponse) ToString() (body string, err error) { v.cacheBodyToMemory() if v.bodyErr != nil { return "", v.bodyErr } return string(v.body), nil }
[ 0.12389461696147919, -0.1748589426279068, 0.33706873655319214, -0.6839094161987305, -0.2473430335521698, 0.058651067316532135, 0.0034716911613941193, -1.14993417263031, 1.0808080434799194, 0.45701342821121216, -0.11660024523735046, -0.14086368680000305, -0.5667425990104675, -0.594888448715...
func (v *DCHttpResponse) GetStatusCode() (statusCode int) { return v.Raw.StatusCode }
[ 0.5467492341995239, -0.1438717544078827, 0.5784336924552917, 0.20092040300369263, -0.43686532974243164, -0.11408986151218414, 0.21666869521141052, 0.6914394497871399, 0.8865892291069031, -1.1413308382034302, -0.5652658939361572, -0.22129639983177185, -0.17481638491153717, -0.08884955942630...
func (v *DCHttpResponse) GetProto() (proto string) { return v.Raw.Proto }
[ 0.7729988098144531, 0.38487881422042847, 0.32363423705101013, 0.4119502007961273, -0.08795753121376038, -0.02662995271384716, 0.25961804389953613, -0.5561197996139526, 0.8424383401870728, -0.9027974605560303, -0.42832598090171814, -0.21820467710494995, -0.3694636821746826, -0.5309259891510...
func (v *DCHttpResponse) GetHeader(key string) (value string) { value, ok := v.Header[key] if !ok { value = "" } return }
[ -0.31802862882614136, -0.018407972529530525, 0.3441581726074219, 0.11771921813488007, -0.29751190543174744, -0.0713154524564743, -0.7180099487304688, -0.7255687117576599, 0.7645379900932312, 0.0557255893945694, 0.19493627548217773, -0.4204756021499634, -0.4631933271884918, -0.0872788652777...
func (v *DCHttpResponse) HasHeader(key string) (ok bool) { _, ok = v.Header[key] return }
[ -0.8355333805084229, -0.12252207100391388, 0.5136744976043701, -0.1454828977584839, -0.4070001542568207, 0.06388791650533676, -0.5591599345207214, -0.20011647045612335, 0.26982933282852173, 0.005052892025560141, -0.513309895992279, -1.0239416360855103, -0.2898677587509155, 0.22990897297859...
func (v *DCHttpResponse) GetHeaders() (headers map[string]string) { return v.Header }
[ -0.35586267709732056, -0.8055421710014343, 0.3541558086872101, -0.01326555386185646, -0.08232598006725311, 0.0386846698820591, -0.4595652222633362, -0.8198438882827759, 0.848525881767273, -0.7704220414161682, -0.48602914810180664, -0.7544479966163635, -0.760993242263794, -0.001469265669584...
func (v *DCHttpResponse) Close() { if !v.Raw.Close && v.Raw.Body != nil { v.Raw.Body.Close() } }
[ -0.06386734545230865, -0.185318261384964, 0.5224298238754272, -0.8846165537834167, -0.37176424264907837, 0.6475473046302795, 0.2923009991645813, -0.9093732833862305, 0.38410037755966187, -0.9737598896026611, 0.24315425753593445, -0.48025402426719666, -1.0394130945205688, 1.0247550010681152...
func (v *DCHttpClient) SetCommonHeaders(headers map[string]string) { for key, val := range headers { v.CHeader[key] = val } }
[ -0.756926417350769, -0.546208381652832, 0.3300887644290924, -0.05686035007238388, 0.10787653177976608, 0.1758286952972412, -0.41670095920562744, -0.01832946389913559, -0.2113162875175476, 0.9893012046813965, -0.5594632625579834, -0.09623265266418457, -0.9433373212814331, 1.0572471618652344...
func (v *DCHttpClient) SetCommonHeader(key string, value string) { v.CHeader[key] = value }
[ -0.6080508828163147, -0.2266995757818222, 0.2950173020362854, -0.22127993404865265, -0.07113105058670044, 0.5589239001274109, -0.2621077001094818, 0.06768932193517685, -0.323515385389328, 1.0491797924041748, -0.546646773815155, 0.3073272705078125, -0.804317831993103, 0.9307244420051575, ...
func (v *DCHttpClient) DelCommonHeader(key string) { delete(v.CHeader, key) }
[ 0.09907641261816025, -0.269612580537796, 0.3308120667934418, -0.4932725131511688, -0.4527738690376282, 0.4549393951892853, -0.38927599787712097, 0.23656007647514343, -0.1249300092458725, 1.2205851078033447, -0.2860887348651886, 0.0817175805568695, -1.305549144744873, 0.9409127831459045, ...
func (v *DCHttpClient) SetFallbackDelay(delay time.Duration) { v.Dialer.FallbackDelay = delay }
[ 0.14148485660552979, 0.17360791563987732, 0.3540467619895935, -0.741604208946228, 0.13047485053539276, 0.12872576713562012, -0.36253586411476135, -0.6829665899276733, 0.39614373445510864, -1.2890759706497192, -0.5968050956726074, 0.4798780679702759, -0.8321287035942078, 1.2478210926055908,...
func (v *DCHttpClient) SetConnectTimeout(timeout time.Duration) { v.Dialer.Timeout = timeout }
[ 0.11939435452222824, -0.5190161466598511, 0.2679084837436676, -0.767559826374054, -0.304870069026947, 0.7950401902198792, -0.3289391100406647, 0.07429298013448715, -0.26476892828941345, 1.0126667022705078, -0.1706606149673462, -0.5017153024673462, 0.195363387465477, 0.7879461646080017, -...
func (v *DCHttpClient) SetKeepAliveIdleTimeout(timeout time.Duration) { v.Transport.IdleConnTimeout = timeout }
[ 0.42501726746559143, -0.8800504803657532, 0.5703582763671875, -1.9095577001571655, 0.37904688715934753, 0.8620268106460571, -0.7177531123161316, -0.18491201102733612, -0.22940917313098907, 0.388102650642395, -1.2531461715698242, -0.10232609510421753, -0.9671772122383118, -1.096146702766418...
func (v *DCHttpClient) SetResponseHeaderTimeout(timeout time.Duration) { v.Transport.ResponseHeaderTimeout = timeout }
[ 0.3678831458091736, -1.0396641492843628, 0.26855212450027466, -1.033805251121521, 0.008983561769127846, 0.2587096393108368, 0.11121325939893723, -0.15222541987895966, 0.39619705080986023, 0.33279722929000854, -0.8095528483390808, -0.8380647897720337, -0.4500223696231842, -0.795876979827880...
func (v *DCHttpClient) SetExpectContinueTimeout(timeout time.Duration) { v.Transport.ExpectContinueTimeout = timeout }
[ 1.3217909336090088, -0.44277170300483704, 0.5255740880966187, -0.8764127492904663, -0.35285651683807373, 0.7644639611244202, 0.09469956159591675, 0.7077641487121582, 0.013339562341570854, 0.8483420014381409, -0.47484463453292847, 0.2699974775314331, -0.4527243375778198, 0.24848008155822754...
func (v *DCHttpClient) SetKeepAlive(enable bool) { v.Transport.DisableKeepAlives = !enable }
[ 0.15971599519252777, 0.11320657283067703, 0.5960792303085327, -0.09065787494182587, -0.269120454788208, 1.3794665336608887, -0.3491029143333435, -0.00771473441272974, -0.9230970144271851, 0.14286352694034576, -0.7245001196861267, -0.4570300877094269, -1.185660719871521, -0.7091614007949829...
func (v *DCHttpClient) SetMaxIdleConns(size int) { v.Transport.MaxIdleConns = size }
[ -0.8584274649620056, -0.22964707016944885, 0.539267361164093, -0.5403178334236145, -0.1178947165608406, 0.2597114145755768, -0.13401994109153748, -0.20429080724716187, 1.5281323194503784, -0.4565334916114807, -1.8105157613754272, -0.021712062880396843, -0.4257737398147583, -0.8096849918365...
func (v *DCHttpClient) SetMaxIdleConnsPerHost(size int) { v.Transport.MaxIdleConnsPerHost = size }
[ -0.333798885345459, -0.18999572098255157, 0.4917973279953003, -0.0864206850528717, -0.3128926753997803, 0.6236786842346191, -0.26486334204673767, 0.16075070202350616, 0.3515215218067169, -0.7033966779708862, -1.1441214084625244, -0.38550934195518494, -0.6561336517333984, -0.500998675823211...
func (v *DCHttpClient) SetMaxConnsPerHost(size int) { v.Transport.MaxConnsPerHost = size }
[ -0.33646199107170105, -0.0013229218311607838, 0.3081282675266266, 0.18753913044929504, -1.071859359741211, 0.3522026240825653, -0.42689135670661926, -0.012667030096054077, -0.09772131592035294, -0.42797720432281494, -1.016405701637268, -0.45830780267715454, -0.4225081503391266, -0.04624132...
func (v *DCHttpClient) SetCompression(enable bool) { v.Transport.DisableCompression = !enable }
[ -0.14785200357437134, 0.31492823362350464, 0.3090439736843109, 0.5011044144630432, -0.3330605924129486, 0.7365984320640564, 1.0635578632354736, 0.9581043124198914, -0.4482358396053314, 0.9279075264930725, -0.946729302406311, -0.8661730289459229, -1.7610636949539185, 0.6818171143531799, 0...
func (v *DCHttpClient) SetTLSVerify(enable bool) { v.Transport.TLSClientConfig.InsecureSkipVerify = !enable }
[ 0.14180444180965424, 0.6436554789543152, 0.4003857374191284, -0.205609530210495, -0.8580296635627747, 0.7938987612724304, -0.7119846343994141, 0.4738963544368744, -1.0067278146743774, 0.2972765862941742, -1.8197866678237915, -0.29911553859710693, -0.591718852519989, 0.36839476227760315, ...
func (v *DCHttpClient) SetTLSHandshakeTimeout(timeout time.Duration) { v.Transport.TLSHandshakeTimeout = timeout }
[ 0.5637080073356628, -0.2112315595149994, 0.14172855019569397, -1.3352071046829224, -0.17784902453422546, 1.428117275238037, -0.3649466037750244, 0.5234959721565247, -0.3113945424556732, 0.4884786605834961, -0.7598185539245605, -0.22182568907737732, 0.32687756419181824, 0.5410873889923096, ...
func (v *DCHttpClient) SetTrace(enable bool) { v.Trace = enable }
[ 0.5998561978340149, 0.6863126754760742, 0.5259459614753723, 0.6757718324661255, 0.6238883137702942, 0.988661527633667, 0.1466572880744934, 0.4773573577404022, 0.5266984701156616, 0.3270738422870636, -0.4467865228652954, 0.005928759463131428, -2.1667842864990234, 0.24136467278003693, -0.8...
func (v *DCHttpClient) SetCookieJar(jar *cookiejar.Jar) { v.Core.Jar = jar }
[ -1.466755747795105, 0.0912603810429573, 0.20352855324745178, -0.04522136598825455, -1.0840057134628296, 0.2766093611717224, 1.3645373582839966, 0.2904948890209198, 0.004979877732694149, 0.1166745275259018, -0.3473469018936157, 0.029025429859757423, -1.6153955459594727, 1.9099984169006348, ...
func (v *DCHttpClient) NewCookieJar() { cookieJar, _ := cookiejar.New(nil) v.SetCookieJar(cookieJar) }
[ -1.0356799364089966, -0.1336745023727417, 0.10878336429595947, 0.14899274706840515, -1.2827404737472534, -0.6491998434066772, 0.7817518711090088, -0.20877258479595184, -0.5882569551467896, -0.17378932237625122, 0.12409289926290512, 0.19600005447864532, -0.8789668679237366, 1.64222717285156...