Mark PreparedMsg as EXPERIMENTAL (#2783)
This commit is contained in:
10
preloader.go
10
preloader.go
@ -23,7 +23,9 @@ import (
|
|||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PreparedMsg is responsible for creating a Marshalled and Compressed object
|
// PreparedMsg is responsible for creating a Marshalled and Compressed object.
|
||||||
|
//
|
||||||
|
// This API is EXPERIMENTAL.
|
||||||
type PreparedMsg struct {
|
type PreparedMsg struct {
|
||||||
// Struct for preparing msg before sending them
|
// Struct for preparing msg before sending them
|
||||||
encodedData []byte
|
encodedData []byte
|
||||||
@ -31,11 +33,7 @@ type PreparedMsg struct {
|
|||||||
payload []byte
|
payload []byte
|
||||||
}
|
}
|
||||||
|
|
||||||
// Encode is responsible for preprocessing the data using relevant information
|
// Encode marshalls and compresses the message using the codec and compressor for the stream.
|
||||||
// from the stream's Context
|
|
||||||
// TODO(prannayk) : if something changes then mark prepared msg as old
|
|
||||||
// Encode : marshal and compresses data based on stream context
|
|
||||||
// Returns error in case of error
|
|
||||||
func (p *PreparedMsg) Encode(s Stream, msg interface{}) error {
|
func (p *PreparedMsg) Encode(s Stream, msg interface{}) error {
|
||||||
ctx := s.Context()
|
ctx := s.Context()
|
||||||
rpcInfo, ok := rpcInfoFromContext(ctx)
|
rpcInfo, ok := rpcInfoFromContext(ctx)
|
||||||
|
Reference in New Issue
Block a user