- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for NewDecoder (0.09 sec)
-
cmd/peer-rest-client.go
respBody, err := client.callWithContext(ctx, peerRESTMethodDownloadProfilingData, nil, nil, -1) if err != nil { return } defer xhttp.DrainBody(respBody) err = gob.NewDecoder(respBody).Decode(&data) return data, err } // GetBucketStats - load bucket statistics func (client *peerRESTClient) GetBucketStats(ctx context.Context, bucket string) (BucketStats, error) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 09 16:58:30 UTC 2024 - 26.1K bytes - Viewed (0) -
cmd/postpolicyform.go
// keys, so we need to use this technique to merge the // keys. func sanitizePolicy(r io.Reader) (io.Reader, error) { var buf bytes.Buffer e := json.NewEncoder(&buf) d := jstream.NewDecoder(r, 0).ObjectAsKVS().MaxDepth(10) sset := set.NewStringSet() for mv := range d.Stream() { var kvs jstream.KVS if mv.ValueType == jstream.Object { // This is a JSON object type (that preserves key order)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 12.4K bytes - Viewed (0) -
istioctl/pkg/admin/istiodconfig.go
if err != nil { return nil, err } defer resp.Body.Close() if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("request not successful %s", resp.Status) } err = json.NewDecoder(resp.Body).Decode(&scopeInfos) if err != nil { return nil, fmt.Errorf("cannot deserialize response %s", err) } return scopeInfos, nil } func (c *ControlzClient) PutScope(scope *ScopeInfo) error {
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Sat Apr 13 05:23:38 UTC 2024 - 13.5K bytes - Viewed (0) -
internal/bucket/object/lock/lock.go
const maxObjectLockConfigSize = 1 << 12 // ParseObjectLockConfig parses ObjectLockConfig from xml func ParseObjectLockConfig(reader io.Reader) (*Config, error) { config := Config{} if err := xml.NewDecoder(io.LimitReader(reader, maxObjectLockConfigSize)).Decode(&config); err != nil { return nil, err } return &config, nil } // NewObjectLockConfig returns a initialized lock.Config struct
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Jun 29 01:20:27 UTC 2024 - 17.1K bytes - Viewed (0) -
internal/bucket/lifecycle/lifecycle.go
} // ParseLifecycleConfigWithID - parses for a Lifecycle config and assigns // unique id to rules with empty ID. func ParseLifecycleConfigWithID(r io.Reader) (*Lifecycle, error) { var lc Lifecycle if err := xml.NewDecoder(r).Decode(&lc); err != nil { return nil, err } // assign a unique id for rules with empty ID for i := range lc.Rules { if lc.Rules[i].ID == "" { lc.Rules[i].ID = uuid.New().String() } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu May 23 01:12:48 UTC 2024 - 17.9K bytes - Viewed (0) -
internal/config/identity/plugin/config.go
o.serviceMetrics.accumRequestRTT(reqStartTime, float64(reqDurNanos)/1e6, true) switch resp.StatusCode { case 200: var result AuthNSuccessResponse if err = json.NewDecoder(resp.Body).Decode(&result); err != nil { return AuthNResponse{}, err } if result.MaxValiditySeconds < minValidityDurationSeconds || result.MaxValiditySeconds > maxValidityDurationSeconds {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 13.3K bytes - Viewed (0) -
internal/event/target/elasticsearch.go
resp, err := c.Info( c.Info.WithContext(ctx), ) if err != nil { return ESSUnknown, "", store.ErrNotConnected } defer resp.Body.Close() m := make(map[string]interface{}) err = json.NewDecoder(resp.Body).Decode(&m) if err != nil { return ESSUnknown, "", fmt.Errorf("unable to get ES Server version - json parse error: %v", err) } if v, ok := m["version"].(map[string]interface{}); ok {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 15K bytes - Viewed (0) -
internal/s3select/jstream/decoder.go
err error // follow line position to add context to errors lineNo int lineStart int64 } // NewDecoder creates new Decoder to read JSON values at the provided // emitDepth from the provider io.Reader. // If emitDepth is < 0, values at every depth will be emitted. func NewDecoder(r io.Reader, emitDepth int) *Decoder { d := &Decoder{ scanner: newScanner(r), emitDepth: emitDepth,
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 13.5K bytes - Viewed (0) -
cmd/admin-handlers_test.go
adminTestBed.router.ServeHTTP(rec, req) if rec.Code != http.StatusOK { t.Errorf("Expected to succeed but failed with %d", rec.Code) } results := madmin.InfoMessage{} err = json.NewDecoder(rec.Body).Decode(&results) if err != nil { t.Fatalf("Failed to decode set config result json %v", err) } if results.Region != globalMinioDefaultRegion {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jul 24 10:24:01 UTC 2024 - 13.9K bytes - Viewed (0) -
cmd/perf-tests.go
Transport: globalRemoteTargetTransport, } resp, err := client.Do(req) if err != nil { result.Error = err.Error() return } defer xhttp.DrainBody(resp.Body) err = gob.NewDecoder(resp.Body).Decode(&result) // endpoint have been overwritten result.Endpoint = rp.String() if err != nil { result.Error = err.Error() } return
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 11.8K bytes - Viewed (0)