MCPcopy
hub / github.com/grpc/grpc-go / MarshalJSON

Method MarshalJSON

internal/xds/bootstrap/bootstrap.go:578–588  ·  view source on GitHub ↗

MarshalJSON returns marshaled JSON bytes corresponding to this config.

()

Source from the content-addressed store, hash-verified

576
577// MarshalJSON returns marshaled JSON bytes corresponding to this config.
578func (c *Config) MarshalJSON() ([]byte, error) {
579 config := &configJSON{
580 XDSServers: c.xDSServers,
581 CertificateProviders: c.cpcs,
582 ServerListenerResourceNameTemplate: c.serverListenerResourceNameTemplate,
583 ClientDefaultListenerResourceNameTemplate: c.clientDefaultListenerResourceNameTemplate,
584 Authorities: c.authorities,
585 Node: c.node,
586 }
587 return json.MarshalIndent(config, " ", " ")
588}
589
590// UnmarshalJSON takes the json data (the complete bootstrap configuration) and
591// unmarshals it to the struct.

Callers 3

StringMethod · 0.95
updateChildrenMethod · 0.45
EqualMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected