sim

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterSimulatorServer

func RegisterSimulatorServer(s *grpc.Server, srv SimulatorServer)

Types

type Empty

type Empty struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

an empty message

func (*Empty) Descriptor

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

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) String

func (m *Empty) String() string

func (*Empty) XXX_DiscardUnknown

func (m *Empty) XXX_DiscardUnknown()

func (*Empty) XXX_Marshal

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

func (*Empty) XXX_Merge

func (dst *Empty) XXX_Merge(src proto.Message)

func (*Empty) XXX_Size

func (m *Empty) XXX_Size() int

func (*Empty) XXX_Unmarshal

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

type InitRequest

type InitRequest struct {
	NHonest              int32    `protobuf:"varint,1,opt,name=nHonest,proto3" json:"nHonest,omitempty"`
	NFS                  int32    `protobuf:"varint,2,opt,name=nFS,proto3" json:"nFS,omitempty"`
	NBF                  int32    `protobuf:"varint,3,opt,name=nBF,proto3" json:"nBF,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The request message telling the server to initialize the necessary parameters

func (*InitRequest) Descriptor

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

func (*InitRequest) GetNBF

func (m *InitRequest) GetNBF() int32

func (*InitRequest) GetNFS

func (m *InitRequest) GetNFS() int32

func (*InitRequest) GetNHonest

func (m *InitRequest) GetNHonest() int32

func (*InitRequest) ProtoMessage

func (*InitRequest) ProtoMessage()

func (*InitRequest) Reset

func (m *InitRequest) Reset()

func (*InitRequest) String

func (m *InitRequest) String() string

func (*InitRequest) XXX_DiscardUnknown

func (m *InitRequest) XXX_DiscardUnknown()

func (*InitRequest) XXX_Marshal

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

func (*InitRequest) XXX_Merge

func (dst *InitRequest) XXX_Merge(src proto.Message)

func (*InitRequest) XXX_Size

func (m *InitRequest) XXX_Size() int

func (*InitRequest) XXX_Unmarshal

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

type Proposal

type Proposal struct {
	PlayerID             int32    `protobuf:"varint,1,opt,name=playerID,proto3" json:"playerID,omitempty"`
	InternalMsgType      uint32   `protobuf:"varint,2,opt,name=internalMsgType,proto3" json:"internalMsgType,omitempty"`
	Value                string   `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Proposal) Descriptor

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

func (*Proposal) GetInternalMsgType

func (m *Proposal) GetInternalMsgType() uint32

func (*Proposal) GetPlayerID

func (m *Proposal) GetPlayerID() int32

func (*Proposal) GetValue

func (m *Proposal) GetValue() string

func (*Proposal) ProtoMessage

func (*Proposal) ProtoMessage()

func (*Proposal) Reset

func (m *Proposal) Reset()

func (*Proposal) String

func (m *Proposal) String() string

func (*Proposal) XXX_DiscardUnknown

func (m *Proposal) XXX_DiscardUnknown()

func (*Proposal) XXX_Marshal

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

func (*Proposal) XXX_Merge

func (dst *Proposal) XXX_Merge(src proto.Message)

func (*Proposal) XXX_Size

func (m *Proposal) XXX_Size() int

func (*Proposal) XXX_Unmarshal

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

type Reply

type Reply struct {
	MessageType          int32    `protobuf:"varint,1,opt,name=messageType,proto3" json:"messageType,omitempty"`
	InternalMsgType      uint32   `protobuf:"varint,2,opt,name=internalMsgType,proto3" json:"internalMsgType,omitempty"`
	Value                string   `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The response message returning the output of the consensus engine

func (*Reply) Descriptor

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

func (*Reply) GetInternalMsgType

func (m *Reply) GetInternalMsgType() uint32

func (*Reply) GetMessageType

func (m *Reply) GetMessageType() int32

func (*Reply) GetValue

func (m *Reply) GetValue() string

func (*Reply) ProtoMessage

func (*Reply) ProtoMessage()

func (*Reply) Reset

func (m *Reply) Reset()

func (*Reply) String

func (m *Reply) String() string

func (*Reply) XXX_DiscardUnknown

func (m *Reply) XXX_DiscardUnknown()

func (*Reply) XXX_Marshal

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

func (*Reply) XXX_Merge

func (dst *Reply) XXX_Merge(src proto.Message)

func (*Reply) XXX_Size

func (m *Reply) XXX_Size() int

func (*Reply) XXX_Unmarshal

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

type Request

type Request struct {
	PlayerID             int32    `protobuf:"varint,1,opt,name=playerID,proto3" json:"playerID,omitempty"`
	InternalMsgType      uint32   `protobuf:"varint,2,opt,name=internalMsgType,proto3" json:"internalMsgType,omitempty"`
	Value                string   `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The request message containing the playerID and the value of the message being fed into the consensus engine

func (*Request) Descriptor

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

func (*Request) GetInternalMsgType

func (m *Request) GetInternalMsgType() uint32

func (*Request) GetPlayerID

func (m *Request) GetPlayerID() int32

func (*Request) GetValue

func (m *Request) GetValue() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

func (*Request) XXX_DiscardUnknown

func (m *Request) XXX_DiscardUnknown()

func (*Request) XXX_Marshal

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

func (*Request) XXX_Merge

func (dst *Request) XXX_Merge(src proto.Message)

func (*Request) XXX_Size

func (m *Request) XXX_Size() int

func (*Request) XXX_Unmarshal

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

type SimulatorClient

type SimulatorClient interface {
	Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (Simulator_PingClient, error)
	Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (Simulator_InitClient, error)
	Exit(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
}

SimulatorClient is the client API for Simulator service.

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

func NewSimulatorClient

func NewSimulatorClient(cc *grpc.ClientConn) SimulatorClient

type SimulatorServer

type SimulatorServer interface {
	Ping(*Request, Simulator_PingServer) error
	Init(*InitRequest, Simulator_InitServer) error
	Exit(context.Context, *Empty) (*Empty, error)
}

SimulatorServer is the server API for Simulator service.

type Simulator_InitClient

type Simulator_InitClient interface {
	Recv() (*Proposal, error)
	grpc.ClientStream
}

type Simulator_InitServer

type Simulator_InitServer interface {
	Send(*Proposal) error
	grpc.ServerStream
}

type Simulator_PingClient

type Simulator_PingClient interface {
	Recv() (*Reply, error)
	grpc.ClientStream
}

type Simulator_PingServer

type Simulator_PingServer interface {
	Send(*Reply) error
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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