MCPcopy
hub / github.com/micro/go-micro / Codec

Interface Codec

codec/codec.go:30–35  ·  view source on GitHub ↗

Codec encodes/decodes various types of messages used within go-micro. ReadHeader and ReadBody are called in pairs to read requests/responses from the connection. Close is called when finished with the connection. ReadBody may be called with a nil argument to force the body to be read and discarded.

Source from the content-addressed store, hash-verified

28// connection. ReadBody may be called with a nil argument to force the
29// body to be read and discarded.
30type Codec interface {
31 Reader
32 Writer
33 Close() error
34 String() string
35}
36
37type Reader interface {
38 ReadHeader(*Message, MessageType) error

Callers 10

CloseMethod · 0.65
InitMethod · 0.65
CloseMethod · 0.65
streamMethod · 0.65
TestGRPCClientFunction · 0.65
testPoolFunction · 0.65
getConnMethod · 0.65
releaseMethod · 0.65
TestAnyTypeMarshalingFunction · 0.65
TestCodecAnyTypeWriteFunction · 0.65

Implementers 15

rpcCodecclient/rpc_codec.go
grpcCodecclient/grpc/codec.go
memoryModelmodel/memory.go
postgresModelmodel/postgres/postgres.go
sqliteModelmodel/sqlite/sqlite.go
fileStorestore/file.go
noopStorestore/noop.go
memoryStorestore/memory.go
sqlStorestore/postgres/postgres.go
sqlStorestore/postgres/pgx/pgx.go
natsStorestore/nats-js-kv/nats.go
sqlStorestore/mysql/mysql.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…