pb

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BBAType_name = map[int32]string{
	0: "BVAL",
	1: "AUX",
}
View Source
var BBAType_value = map[string]int32{
	"BVAL": 0,
	"AUX":  1,
}
View Source
var RBCType_name = map[int32]string{
	0: "VAL",
	1: "ECHO",
	2: "READY",
}
View Source
var RBCType_value = map[string]int32{
	"VAL":   0,
	"ECHO":  1,
	"READY": 2,
}

Functions

func RegisterStreamServiceServer

func RegisterStreamServiceServer(s *grpc.Server, srv StreamServiceServer)

Types

type BBA

type BBA struct {
	// marshaled data by type
	Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// each epoch's BBA round, it is different with epoch
	Round uint64 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"`
	// payload type
	Type                 BBAType  `protobuf:"varint,4,opt,name=type,enum=pb.BBAType" json:"type,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*BBA) Descriptor

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

func (*BBA) GetPayload

func (m *BBA) GetPayload() []byte

func (*BBA) GetRound

func (m *BBA) GetRound() uint64

func (*BBA) ProtoMessage

func (*BBA) ProtoMessage()

func (*BBA) Reset

func (m *BBA) Reset()

func (*BBA) String

func (m *BBA) String() string

func (*BBA) XXX_DiscardUnknown

func (m *BBA) XXX_DiscardUnknown()

func (*BBA) XXX_Marshal

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

func (*BBA) XXX_Merge

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

func (*BBA) XXX_Size

func (m *BBA) XXX_Size() int

func (*BBA) XXX_Unmarshal

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

type BBAType

type BBAType int32

payload type

const (
	BBA_BVAL BBAType = 0
	BBA_AUX  BBAType = 1
)

func (BBAType) EnumDescriptor

func (BBAType) EnumDescriptor() ([]byte, []int)

func (BBAType) String

func (x BBAType) String() string

type Message

type Message struct {
	// The signature of public key
	Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
	// The address of source member who sent this message first
	Proposer string `protobuf:"bytes,2,opt,name=proposer,proto3" json:"proposer,omitempty"`
	// The address of sender member who sent this message
	Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"`
	// The time when the source sends
	Timestamp *timestamp.Timestamp `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// message's epoch
	Epoch uint64 `protobuf:"varint,5,opt,name=epoch,proto3" json:"epoch,omitempty"`
	// Types that are valid to be assigned to Payload:
	//	*Message_Rbc
	//	*Message_Bba
	Payload              isMessage_Payload `protobuf_oneof:"payload"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*Message) Descriptor

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

func (*Message) GetBba

func (m *Message) GetBba() *BBA

func (*Message) GetEpoch

func (m *Message) GetEpoch() uint64

func (*Message) GetPayload

func (m *Message) GetPayload() isMessage_Payload

func (*Message) GetProposer

func (m *Message) GetProposer() string

func (*Message) GetRbc

func (m *Message) GetRbc() *RBC

func (*Message) GetSender

func (m *Message) GetSender() string

func (*Message) GetSignature

func (m *Message) GetSignature() []byte

func (*Message) GetTimestamp

func (m *Message) GetTimestamp() *timestamp.Timestamp

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) String

func (m *Message) String() string

func (*Message) XXX_DiscardUnknown

func (m *Message) XXX_DiscardUnknown()

func (*Message) XXX_Marshal

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

func (*Message) XXX_Merge

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

func (*Message) XXX_OneofWrappers

func (*Message) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Message) XXX_Size

func (m *Message) XXX_Size() int

func (*Message) XXX_Unmarshal

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

type Message_Bba

type Message_Bba struct {
	Bba *BBA `protobuf:"bytes,7,opt,name=bba,proto3,oneof"`
}

type Message_Rbc

type Message_Rbc struct {
	Rbc *RBC `protobuf:"bytes,6,opt,name=rbc,proto3,oneof"`
}

type RBC

type RBC struct {
	// marshaled data by type
	Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// The length of original data
	ContentLength uint64 `protobuf:"varint,2,opt,name=contentLength,proto3" json:"contentLength,omitempty"`
	// payload type
	Type                 RBCType  `protobuf:"varint,3,opt,name=type,enum=pb.RBCType" json:"type,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RBC) Descriptor

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

func (*RBC) GetContentLength

func (m *RBC) GetContentLength() uint64

func (*RBC) GetPayload

func (m *RBC) GetPayload() []byte

func (*RBC) ProtoMessage

func (*RBC) ProtoMessage()

func (*RBC) Reset

func (m *RBC) Reset()

func (*RBC) String

func (m *RBC) String() string

func (*RBC) XXX_DiscardUnknown

func (m *RBC) XXX_DiscardUnknown()

func (*RBC) XXX_Marshal

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

func (*RBC) XXX_Merge

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

func (*RBC) XXX_Size

func (m *RBC) XXX_Size() int

func (*RBC) XXX_Unmarshal

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

type RBCType

type RBCType int32

payload type

const (
	RBC_VAL   RBCType = 0
	RBC_ECHO  RBCType = 1
	RBC_READY RBCType = 2
)

func (RBCType) EnumDescriptor

func (RBCType) EnumDescriptor() ([]byte, []int)

func (RBCType) String

func (x RBCType) String() string

type StreamServiceClient

type StreamServiceClient interface {
	MessageStream(ctx context.Context, opts ...grpc.CallOption) (StreamService_MessageStreamClient, error)
}

StreamServiceClient is the client API for StreamService service.

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

func NewStreamServiceClient

func NewStreamServiceClient(cc *grpc.ClientConn) StreamServiceClient

type StreamServiceServer

type StreamServiceServer interface {
	MessageStream(StreamService_MessageStreamServer) error
}

StreamServiceServer is the server API for StreamService service.

type StreamService_MessageStreamClient

type StreamService_MessageStreamClient interface {
	Send(*Message) error
	Recv() (*Message, error)
	grpc.ClientStream
}

type StreamService_MessageStreamServer

type StreamService_MessageStreamServer interface {
	Send(*Message) error
	Recv() (*Message, error)
	grpc.ServerStream
}

type UnimplementedStreamServiceServer

type UnimplementedStreamServiceServer struct {
}

UnimplementedStreamServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedStreamServiceServer) MessageStream

Jump to

Keyboard shortcuts

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