coregrpc

package
v0.0.0-...-5f4adf5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterBroadcastAPIServer

func RegisterBroadcastAPIServer(s grpc1.Server, srv BroadcastAPIServer)

func StartGRPCServer

func StartGRPCServer(env *core.Environment, ln net.Listener) error

StartGRPCServer starts a new gRPC BroadcastAPIServer using the given net.Listener. NOTE: This function blocks - you may want to call it in a go-routine.

Types

type BroadcastAPIClient

type BroadcastAPIClient interface {
	Ping(ctx context.Context, in *RequestPing, opts ...grpc.CallOption) (*ResponsePing, error)
	BroadcastTx(ctx context.Context, in *RequestBroadcastTx, opts ...grpc.CallOption) (*ResponseBroadcastTx, error)
}

BroadcastAPIClient is the client API for BroadcastAPI service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewBroadcastAPIClient

func NewBroadcastAPIClient(cc grpc1.ClientConn) BroadcastAPIClient

func StartGRPCClient

func StartGRPCClient(protoAddr string) BroadcastAPIClient

StartGRPCClient dials the gRPC server using protoAddr and returns a new BroadcastAPIClient.

type BroadcastAPIServer

type BroadcastAPIServer interface {
	Ping(context.Context, *RequestPing) (*ResponsePing, error)
	BroadcastTx(context.Context, *RequestBroadcastTx) (*ResponseBroadcastTx, error)
}

BroadcastAPIServer is the server API for BroadcastAPI service.

type Config

type Config struct {
	MaxOpenConnections int
}

Config is an gRPC server configuration.

type RequestBroadcastTx

type RequestBroadcastTx struct {
	Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"`
}

func (*RequestBroadcastTx) Descriptor

func (*RequestBroadcastTx) Descriptor() ([]byte, []int)

func (*RequestBroadcastTx) GetTx

func (m *RequestBroadcastTx) GetTx() []byte

func (*RequestBroadcastTx) Marshal

func (m *RequestBroadcastTx) Marshal() (dAtA []byte, err error)

func (*RequestBroadcastTx) MarshalTo

func (m *RequestBroadcastTx) MarshalTo(dAtA []byte) (int, error)

func (*RequestBroadcastTx) MarshalToSizedBuffer

func (m *RequestBroadcastTx) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RequestBroadcastTx) ProtoMessage

func (*RequestBroadcastTx) ProtoMessage()

func (*RequestBroadcastTx) Reset

func (m *RequestBroadcastTx) Reset()

func (*RequestBroadcastTx) Size

func (m *RequestBroadcastTx) Size() (n int)

func (*RequestBroadcastTx) String

func (m *RequestBroadcastTx) String() string

func (*RequestBroadcastTx) Unmarshal

func (m *RequestBroadcastTx) Unmarshal(dAtA []byte) error

func (*RequestBroadcastTx) XXX_DiscardUnknown

func (m *RequestBroadcastTx) XXX_DiscardUnknown()

func (*RequestBroadcastTx) XXX_Marshal

func (m *RequestBroadcastTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RequestBroadcastTx) XXX_Merge

func (m *RequestBroadcastTx) XXX_Merge(src proto.Message)

func (*RequestBroadcastTx) XXX_Size

func (m *RequestBroadcastTx) XXX_Size() int

func (*RequestBroadcastTx) XXX_Unmarshal

func (m *RequestBroadcastTx) XXX_Unmarshal(b []byte) error

type RequestPing

type RequestPing struct {
}

func (*RequestPing) Descriptor

func (*RequestPing) Descriptor() ([]byte, []int)

func (*RequestPing) Marshal

func (m *RequestPing) Marshal() (dAtA []byte, err error)

func (*RequestPing) MarshalTo

func (m *RequestPing) MarshalTo(dAtA []byte) (int, error)

func (*RequestPing) MarshalToSizedBuffer

func (m *RequestPing) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RequestPing) ProtoMessage

func (*RequestPing) ProtoMessage()

func (*RequestPing) Reset

func (m *RequestPing) Reset()

func (*RequestPing) Size

func (m *RequestPing) Size() (n int)

func (*RequestPing) String

func (m *RequestPing) String() string

func (*RequestPing) Unmarshal

func (m *RequestPing) Unmarshal(dAtA []byte) error

func (*RequestPing) XXX_DiscardUnknown

func (m *RequestPing) XXX_DiscardUnknown()

func (*RequestPing) XXX_Marshal

func (m *RequestPing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RequestPing) XXX_Merge

func (m *RequestPing) XXX_Merge(src proto.Message)

func (*RequestPing) XXX_Size

func (m *RequestPing) XXX_Size() int

func (*RequestPing) XXX_Unmarshal

func (m *RequestPing) XXX_Unmarshal(b []byte) error

type ResponseBroadcastTx

type ResponseBroadcastTx struct {
	CheckTx  *types.ResponseCheckTx `protobuf:"bytes,1,opt,name=check_tx,json=checkTx,proto3" json:"check_tx,omitempty"`
	TxResult *types.ExecTxResult    `protobuf:"bytes,2,opt,name=tx_result,json=txResult,proto3" json:"tx_result,omitempty"`
}

func (*ResponseBroadcastTx) Descriptor

func (*ResponseBroadcastTx) Descriptor() ([]byte, []int)

func (*ResponseBroadcastTx) GetCheckTx

func (m *ResponseBroadcastTx) GetCheckTx() *types.ResponseCheckTx

func (*ResponseBroadcastTx) GetTxResult

func (m *ResponseBroadcastTx) GetTxResult() *types.ExecTxResult

func (*ResponseBroadcastTx) Marshal

func (m *ResponseBroadcastTx) Marshal() (dAtA []byte, err error)

func (*ResponseBroadcastTx) MarshalTo

func (m *ResponseBroadcastTx) MarshalTo(dAtA []byte) (int, error)

func (*ResponseBroadcastTx) MarshalToSizedBuffer

func (m *ResponseBroadcastTx) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ResponseBroadcastTx) ProtoMessage

func (*ResponseBroadcastTx) ProtoMessage()

func (*ResponseBroadcastTx) Reset

func (m *ResponseBroadcastTx) Reset()

func (*ResponseBroadcastTx) Size

func (m *ResponseBroadcastTx) Size() (n int)

func (*ResponseBroadcastTx) String

func (m *ResponseBroadcastTx) String() string

func (*ResponseBroadcastTx) Unmarshal

func (m *ResponseBroadcastTx) Unmarshal(dAtA []byte) error

func (*ResponseBroadcastTx) XXX_DiscardUnknown

func (m *ResponseBroadcastTx) XXX_DiscardUnknown()

func (*ResponseBroadcastTx) XXX_Marshal

func (m *ResponseBroadcastTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ResponseBroadcastTx) XXX_Merge

func (m *ResponseBroadcastTx) XXX_Merge(src proto.Message)

func (*ResponseBroadcastTx) XXX_Size

func (m *ResponseBroadcastTx) XXX_Size() int

func (*ResponseBroadcastTx) XXX_Unmarshal

func (m *ResponseBroadcastTx) XXX_Unmarshal(b []byte) error

type ResponsePing

type ResponsePing struct {
}

func (*ResponsePing) Descriptor

func (*ResponsePing) Descriptor() ([]byte, []int)

func (*ResponsePing) Marshal

func (m *ResponsePing) Marshal() (dAtA []byte, err error)

func (*ResponsePing) MarshalTo

func (m *ResponsePing) MarshalTo(dAtA []byte) (int, error)

func (*ResponsePing) MarshalToSizedBuffer

func (m *ResponsePing) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ResponsePing) ProtoMessage

func (*ResponsePing) ProtoMessage()

func (*ResponsePing) Reset

func (m *ResponsePing) Reset()

func (*ResponsePing) Size

func (m *ResponsePing) Size() (n int)

func (*ResponsePing) String

func (m *ResponsePing) String() string

func (*ResponsePing) Unmarshal

func (m *ResponsePing) Unmarshal(dAtA []byte) error

func (*ResponsePing) XXX_DiscardUnknown

func (m *ResponsePing) XXX_DiscardUnknown()

func (*ResponsePing) XXX_Marshal

func (m *ResponsePing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ResponsePing) XXX_Merge

func (m *ResponsePing) XXX_Merge(src proto.Message)

func (*ResponsePing) XXX_Size

func (m *ResponsePing) XXX_Size() int

func (*ResponsePing) XXX_Unmarshal

func (m *ResponsePing) XXX_Unmarshal(b []byte) error

type UnimplementedBroadcastAPIServer

type UnimplementedBroadcastAPIServer struct {
}

UnimplementedBroadcastAPIServer can be embedded to have forward compatible implementations.

func (*UnimplementedBroadcastAPIServer) BroadcastTx

func (*UnimplementedBroadcastAPIServer) Ping

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL