MCPcopy Create free account
hub / github.com/cortexproject/cortex / messageV2Of

Function messageV2Of

pkg/cortexpb/codec.go:129–138  ·  view source on GitHub ↗
(v any)

Source from the content-addressed store, hash-verified

127}
128
129func messageV2Of(v any) proto.Message {
130 switch v := v.(type) {
131 case protoadapt.MessageV1:
132 return protoadapt.MessageV2Of(v)
133 case protoadapt.MessageV2:
134 return v
135 }
136
137 return nil
138}
139
140var _ ReleasableMessage = &MessageWithBufRef{}
141

Callers 2

MarshalMethod · 0.85
UnmarshalMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected