MCPcopy
hub / github.com/spf13/viper / DefaultCodecRegistry

Struct DefaultCodecRegistry

encoding.go:93–98  ·  view source on GitHub ↗

DefaultCodecRegistry is a simple implementation of [CodecRegistry] that allows registering custom [Codec]s.

Source from the content-addressed store, hash-verified

91
92// DefaultCodecRegistry is a simple implementation of [CodecRegistry] that allows registering custom [Codec]s.
93type DefaultCodecRegistry struct {
94 codecs map[string]Codec
95
96 mu sync.RWMutex
97 once sync.Once
98}
99
100// NewCodecRegistry returns a new [CodecRegistry], ready to accept custom [Codec]s.
101func NewCodecRegistry() *DefaultCodecRegistry {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected