Documentation ¶
Index ¶
- Constants
- Variables
- func Decode(bs []byte, msg proto.Message) error
- func Encode(msg proto.Message) ([]byte, error)
- func GRPCDial(grpcAddress string, additionalOpts ...grpc.DialOption) (*grpc.ClientConn, error)
- func GRPCDialContext(ctx context.Context, grpcAddress string, additionalOpts ...grpc.DialOption) (*grpc.ClientConn, error)
- func GetEthChainID(chainID string) *big.Int
- func ReadMessage(r io.Reader, pb proto.Message) (int, error)
- func WriteMessage(w io.Writer, pb proto.Message) (int, error)
- type GRPCCodec
- type TestMessage
- func (*TestMessage) Descriptor() ([]byte, []int)
- func (m *TestMessage) GetAmount() uint64
- func (m *TestMessage) GetType() uint32
- func (m *TestMessage) Marshal() (dAtA []byte, err error)
- func (m *TestMessage) MarshalTo(dAtA []byte) (int, error)
- func (m *TestMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TestMessage) ProtoMessage()
- func (m *TestMessage) Reset()
- func (m *TestMessage) Size() (n int)
- func (tm TestMessage) String() string
- func (m *TestMessage) Unmarshal(dAtA []byte) error
- func (m *TestMessage) XXX_DiscardUnknown()
- func (m *TestMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TestMessage) XXX_Merge(src proto.Message)
- func (*TestMessage) XXX_MessageName() string
- func (m *TestMessage) XXX_Size() int
- func (m *TestMessage) XXX_Unmarshal(b []byte) error
Constants ¶
View Source
const GRPCCodecName = "gogo"
Variables ¶
View Source
var ( ErrInvalidLengthEncoding = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowEncoding = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupEncoding = fmt.Errorf("proto: unexpected end of group") )
View Source
var DefaultDialOptions = []grpc.DialOption{grpc.WithInsecure(), grpc.WithDefaultCallOptions(grpc.CallContentSubtype(GRPCCodecName))}
Functions ¶
func GRPCDial ¶
func GRPCDial(grpcAddress string, additionalOpts ...grpc.DialOption) (*grpc.ClientConn, error)
func GRPCDialContext ¶
func GRPCDialContext(ctx context.Context, grpcAddress string, additionalOpts ...grpc.DialOption) (*grpc.ClientConn, error)
func GetEthChainID ¶
Convert Burrow's ChainID to a *big.Int so it can be used as a nonce for Ethereum signing. For compatibility with Ethereum tooling this function first tries to interpret the ChainID as an integer encoded either as an eth-style 0x-prefixed hex string or a base 10 integer, falling back to interpreting the string's raw bytes as a big-endian integer
func ReadMessage ¶
Read messages with length-prefix framing from the provided Reader. Returns the number of bytes read and io.EOF if ReadMessage is called exactly on the end of a stream.
Types ¶
type TestMessage ¶
type TestMessage struct { Type uint32 `protobuf:"varint,1,opt,name=Type,proto3" json:"Type,omitempty"` Amount uint64 `protobuf:"varint,2,opt,name=Amount,proto3" json:"Amount,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
For testing
func (*TestMessage) Descriptor ¶
func (*TestMessage) Descriptor() ([]byte, []int)
func (*TestMessage) GetAmount ¶
func (m *TestMessage) GetAmount() uint64
func (*TestMessage) GetType ¶
func (m *TestMessage) GetType() uint32
func (*TestMessage) Marshal ¶
func (m *TestMessage) Marshal() (dAtA []byte, err error)
func (*TestMessage) MarshalToSizedBuffer ¶
func (m *TestMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TestMessage) ProtoMessage ¶
func (*TestMessage) ProtoMessage()
func (*TestMessage) Reset ¶
func (m *TestMessage) Reset()
func (*TestMessage) Size ¶
func (m *TestMessage) Size() (n int)
func (TestMessage) String ¶
func (tm TestMessage) String() string
func (*TestMessage) Unmarshal ¶
func (m *TestMessage) Unmarshal(dAtA []byte) error
func (*TestMessage) XXX_DiscardUnknown ¶
func (m *TestMessage) XXX_DiscardUnknown()
func (*TestMessage) XXX_Marshal ¶
func (m *TestMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TestMessage) XXX_Merge ¶
func (m *TestMessage) XXX_Merge(src proto.Message)
func (*TestMessage) XXX_MessageName ¶
func (*TestMessage) XXX_MessageName() string
func (*TestMessage) XXX_Size ¶
func (m *TestMessage) XXX_Size() int
func (*TestMessage) XXX_Unmarshal ¶
func (m *TestMessage) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.