Documentation ¶
Index ¶
- func RegisterGossipServer(s *grpc.Server, srv GossipServer)
- type Accusation
- func (*Accusation) Descriptor() ([]byte, []int)
- func (m *Accusation) GetAccused() []byte
- func (m *Accusation) GetAccuser() []byte
- func (m *Accusation) GetEpoch() uint64
- func (m *Accusation) GetRingNum() uint32
- func (m *Accusation) GetSignature() *Signature
- func (*Accusation) ProtoMessage()
- func (m *Accusation) Reset()
- func (m *Accusation) String() string
- func (m *Accusation) XXX_DiscardUnknown()
- func (m *Accusation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Accusation) XXX_Merge(src proto.Message)
- func (m *Accusation) XXX_Size() int
- func (m *Accusation) XXX_Unmarshal(b []byte) error
- type Certificate
- func (*Certificate) Descriptor() ([]byte, []int)
- func (m *Certificate) GetRaw() []byte
- func (*Certificate) ProtoMessage()
- func (m *Certificate) Reset()
- func (m *Certificate) String() string
- func (m *Certificate) XXX_DiscardUnknown()
- func (m *Certificate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Certificate) XXX_Merge(src proto.Message)
- func (m *Certificate) XXX_Size() int
- func (m *Certificate) XXX_Unmarshal(b []byte) error
- type Data
- func (*Data) Descriptor() ([]byte, []int)
- func (m *Data) GetContent() []byte
- func (m *Data) GetId() []byte
- func (*Data) ProtoMessage()
- func (m *Data) Reset()
- func (m *Data) String() string
- func (m *Data) XXX_DiscardUnknown()
- func (m *Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Data) XXX_Merge(src proto.Message)
- func (m *Data) XXX_Size() int
- func (m *Data) XXX_Unmarshal(b []byte) error
- type GossipClient
- type GossipServer
- type Gossip_StreamClient
- type Gossip_StreamServer
- type Msg
- func (*Msg) Descriptor() ([]byte, []int)
- func (m *Msg) GetContent() []byte
- func (m *Msg) GetError() string
- func (*Msg) ProtoMessage()
- func (m *Msg) Reset()
- func (m *Msg) String() string
- func (m *Msg) XXX_DiscardUnknown()
- func (m *Msg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Msg) XXX_Merge(src proto.Message)
- func (m *Msg) XXX_Size() int
- func (m *Msg) XXX_Unmarshal(b []byte) error
- type MsgResponse
- func (*MsgResponse) Descriptor() ([]byte, []int)
- func (m *MsgResponse) GetContent() []byte
- func (m *MsgResponse) GetError() string
- func (*MsgResponse) ProtoMessage()
- func (m *MsgResponse) Reset()
- func (m *MsgResponse) String() string
- func (m *MsgResponse) XXX_DiscardUnknown()
- func (m *MsgResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgResponse) XXX_Merge(src proto.Message)
- func (m *MsgResponse) XXX_Size() int
- func (m *MsgResponse) XXX_Unmarshal(b []byte) error
- type Note
- func (*Note) Descriptor() ([]byte, []int)
- func (m *Note) GetEpoch() uint64
- func (m *Note) GetId() []byte
- func (m *Note) GetMask() uint32
- func (m *Note) GetSignature() *Signature
- func (*Note) ProtoMessage()
- func (m *Note) Reset()
- func (m *Note) String() string
- func (m *Note) XXX_DiscardUnknown()
- func (m *Note) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Note) XXX_Merge(src proto.Message)
- func (m *Note) XXX_Size() int
- func (m *Note) XXX_Unmarshal(b []byte) error
- type Ping
- func (*Ping) Descriptor() ([]byte, []int)
- func (m *Ping) GetNonce() []byte
- func (*Ping) ProtoMessage()
- func (m *Ping) Reset()
- func (m *Ping) String() string
- func (m *Ping) XXX_DiscardUnknown()
- func (m *Ping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Ping) XXX_Merge(src proto.Message)
- func (m *Ping) XXX_Size() int
- func (m *Ping) XXX_Unmarshal(b []byte) error
- type Pong
- func (*Pong) Descriptor() ([]byte, []int)
- func (m *Pong) GetNonce() []byte
- func (m *Pong) GetSignature() *Signature
- func (*Pong) ProtoMessage()
- func (m *Pong) Reset()
- func (m *Pong) String() string
- func (m *Pong) XXX_DiscardUnknown()
- func (m *Pong) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Pong) XXX_Merge(src proto.Message)
- func (m *Pong) XXX_Size() int
- func (m *Pong) XXX_Unmarshal(b []byte) error
- type Signature
- func (*Signature) Descriptor() ([]byte, []int)
- func (m *Signature) GetR() []byte
- func (m *Signature) GetS() []byte
- func (*Signature) ProtoMessage()
- func (m *Signature) Reset()
- func (m *Signature) String() string
- func (m *Signature) XXX_DiscardUnknown()
- func (m *Signature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Signature) XXX_Merge(src proto.Message)
- func (m *Signature) XXX_Size() int
- func (m *Signature) XXX_Unmarshal(b []byte) error
- type State
- func (*State) Descriptor() ([]byte, []int)
- func (m *State) GetExistingHosts() map[string]uint64
- func (m *State) GetExternalGossip() []byte
- func (m *State) GetOwnNote() *Note
- func (*State) ProtoMessage()
- func (m *State) Reset()
- func (m *State) String() string
- func (m *State) XXX_DiscardUnknown()
- func (m *State) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *State) XXX_Merge(src proto.Message)
- func (m *State) XXX_Size() int
- func (m *State) XXX_Unmarshal(b []byte) error
- type StateResponse
- func (*StateResponse) Descriptor() ([]byte, []int)
- func (m *StateResponse) GetAccusations() []*Accusation
- func (m *StateResponse) GetCertificates() []*Certificate
- func (m *StateResponse) GetExternalGossip() []byte
- func (m *StateResponse) GetNotes() []*Note
- func (*StateResponse) ProtoMessage()
- func (m *StateResponse) Reset()
- func (m *StateResponse) String() string
- func (m *StateResponse) XXX_DiscardUnknown()
- func (m *StateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StateResponse) XXX_Merge(src proto.Message)
- func (m *StateResponse) XXX_Size() int
- func (m *StateResponse) XXX_Unmarshal(b []byte) error
- type Test
- func (*Test) Descriptor() ([]byte, []int)
- func (m *Test) GetNums() []int32
- func (*Test) ProtoMessage()
- func (m *Test) Reset()
- func (m *Test) String() string
- func (m *Test) XXX_DiscardUnknown()
- func (m *Test) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Test) XXX_Merge(src proto.Message)
- func (m *Test) XXX_Size() int
- func (m *Test) XXX_Unmarshal(b []byte) error
- type UnimplementedGossipServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterGossipServer ¶
func RegisterGossipServer(s *grpc.Server, srv GossipServer)
Types ¶
type Accusation ¶
type Accusation struct { Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` Accuser []byte `protobuf:"bytes,2,opt,name=accuser,proto3" json:"accuser,omitempty"` Accused []byte `protobuf:"bytes,3,opt,name=accused,proto3" json:"accused,omitempty"` Signature *Signature `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` RingNum uint32 `protobuf:"varint,5,opt,name=ringNum,proto3" json:"ringNum,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
accuser and accused are the respective node ids
func (*Accusation) Descriptor ¶
func (*Accusation) Descriptor() ([]byte, []int)
func (*Accusation) GetAccused ¶
func (m *Accusation) GetAccused() []byte
func (*Accusation) GetAccuser ¶
func (m *Accusation) GetAccuser() []byte
func (*Accusation) GetEpoch ¶
func (m *Accusation) GetEpoch() uint64
func (*Accusation) GetRingNum ¶
func (m *Accusation) GetRingNum() uint32
func (*Accusation) GetSignature ¶
func (m *Accusation) GetSignature() *Signature
func (*Accusation) ProtoMessage ¶
func (*Accusation) ProtoMessage()
func (*Accusation) Reset ¶
func (m *Accusation) Reset()
func (*Accusation) String ¶
func (m *Accusation) String() string
func (*Accusation) XXX_DiscardUnknown ¶
func (m *Accusation) XXX_DiscardUnknown()
func (*Accusation) XXX_Marshal ¶
func (m *Accusation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Accusation) XXX_Merge ¶
func (m *Accusation) XXX_Merge(src proto.Message)
func (*Accusation) XXX_Size ¶
func (m *Accusation) XXX_Size() int
func (*Accusation) XXX_Unmarshal ¶
func (m *Accusation) XXX_Unmarshal(b []byte) error
type Certificate ¶
type Certificate struct { Raw []byte `protobuf:"bytes,1,opt,name=raw,proto3" json:"raw,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Raw certificate
func (*Certificate) Descriptor ¶
func (*Certificate) Descriptor() ([]byte, []int)
func (*Certificate) GetRaw ¶
func (m *Certificate) GetRaw() []byte
func (*Certificate) ProtoMessage ¶
func (*Certificate) ProtoMessage()
func (*Certificate) Reset ¶
func (m *Certificate) Reset()
func (*Certificate) String ¶
func (m *Certificate) String() string
func (*Certificate) XXX_DiscardUnknown ¶
func (m *Certificate) XXX_DiscardUnknown()
func (*Certificate) XXX_Marshal ¶
func (m *Certificate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Certificate) XXX_Merge ¶
func (m *Certificate) XXX_Merge(src proto.Message)
func (*Certificate) XXX_Size ¶
func (m *Certificate) XXX_Size() int
func (*Certificate) XXX_Unmarshal ¶
func (m *Certificate) XXX_Unmarshal(b []byte) error
type Data ¶
type Data struct { Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` Id []byte `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Data) Descriptor ¶
func (*Data) GetContent ¶
func (*Data) ProtoMessage ¶
func (*Data) ProtoMessage()
func (*Data) XXX_DiscardUnknown ¶
func (m *Data) XXX_DiscardUnknown()
func (*Data) XXX_Unmarshal ¶
type GossipClient ¶
type GossipClient interface { Spread(ctx context.Context, in *State, opts ...grpc.CallOption) (*StateResponse, error) Messenger(ctx context.Context, in *Msg, opts ...grpc.CallOption) (*MsgResponse, error) Stream(ctx context.Context, opts ...grpc.CallOption) (Gossip_StreamClient, error) }
GossipClient is the client API for Gossip service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewGossipClient ¶
func NewGossipClient(cc *grpc.ClientConn) GossipClient
type GossipServer ¶
type GossipServer interface { Spread(context.Context, *State) (*StateResponse, error) Messenger(context.Context, *Msg) (*MsgResponse, error) Stream(Gossip_StreamServer) error }
GossipServer is the server API for Gossip service.
type Gossip_StreamClient ¶
type Gossip_StreamClient interface { Send(*Msg) error Recv() (*MsgResponse, error) grpc.ClientStream }
type Gossip_StreamServer ¶
type Gossip_StreamServer interface { Send(*MsgResponse) error Recv() (*Msg, error) grpc.ServerStream }
type Msg ¶
type Msg struct { Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Application message
func (*Msg) Descriptor ¶
func (*Msg) GetContent ¶
func (*Msg) ProtoMessage ¶
func (*Msg) ProtoMessage()
func (*Msg) XXX_DiscardUnknown ¶
func (m *Msg) XXX_DiscardUnknown()
func (*Msg) XXX_Unmarshal ¶
type MsgResponse ¶
type MsgResponse struct { Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Application response
func (*MsgResponse) Descriptor ¶
func (*MsgResponse) Descriptor() ([]byte, []int)
func (*MsgResponse) GetContent ¶
func (m *MsgResponse) GetContent() []byte
func (*MsgResponse) GetError ¶
func (m *MsgResponse) GetError() string
func (*MsgResponse) ProtoMessage ¶
func (*MsgResponse) ProtoMessage()
func (*MsgResponse) Reset ¶
func (m *MsgResponse) Reset()
func (*MsgResponse) String ¶
func (m *MsgResponse) String() string
func (*MsgResponse) XXX_DiscardUnknown ¶
func (m *MsgResponse) XXX_DiscardUnknown()
func (*MsgResponse) XXX_Marshal ¶
func (m *MsgResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgResponse) XXX_Merge ¶
func (m *MsgResponse) XXX_Merge(src proto.Message)
func (*MsgResponse) XXX_Size ¶
func (m *MsgResponse) XXX_Size() int
func (*MsgResponse) XXX_Unmarshal ¶
func (m *MsgResponse) XXX_Unmarshal(b []byte) error
type Note ¶
type Note struct { Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` Id []byte `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` Mask uint32 `protobuf:"varint,3,opt,name=mask,proto3" json:"mask,omitempty"` Signature *Signature `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Note) Descriptor ¶
func (*Note) GetSignature ¶
func (*Note) ProtoMessage ¶
func (*Note) ProtoMessage()
func (*Note) XXX_DiscardUnknown ¶
func (m *Note) XXX_DiscardUnknown()
func (*Note) XXX_Unmarshal ¶
type Ping ¶
type Ping struct { Nonce []byte `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Ping) Descriptor ¶
func (*Ping) ProtoMessage ¶
func (*Ping) ProtoMessage()
func (*Ping) XXX_DiscardUnknown ¶
func (m *Ping) XXX_DiscardUnknown()
func (*Ping) XXX_Unmarshal ¶
type Pong ¶
type Pong struct { Nonce []byte `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"` Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Pong) Descriptor ¶
func (*Pong) GetSignature ¶
func (*Pong) ProtoMessage ¶
func (*Pong) ProtoMessage()
func (*Pong) XXX_DiscardUnknown ¶
func (m *Pong) XXX_DiscardUnknown()
func (*Pong) XXX_Unmarshal ¶
type Signature ¶
type Signature struct { R []byte `protobuf:"bytes,1,opt,name=r,proto3" json:"r,omitempty"` S []byte `protobuf:"bytes,2,opt,name=s,proto3" json:"s,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Raw elliptic signature
func (*Signature) Descriptor ¶
func (*Signature) ProtoMessage ¶
func (*Signature) ProtoMessage()
func (*Signature) XXX_DiscardUnknown ¶
func (m *Signature) XXX_DiscardUnknown()
func (*Signature) XXX_Marshal ¶
func (*Signature) XXX_Unmarshal ¶
type State ¶
type State struct { //repeated NodeInfo existingNodes ExistingHosts map[string]uint64 `` /* 168-byte string literal not displayed */ OwnNote *Note `protobuf:"bytes,2,opt,name=ownNote,proto3" json:"ownNote,omitempty"` ExternalGossip []byte `protobuf:"bytes,3,opt,name=externalGossip,proto3" json:"externalGossip,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*State) Descriptor ¶
func (*State) GetExistingHosts ¶
func (*State) GetExternalGossip ¶
func (*State) GetOwnNote ¶
func (*State) ProtoMessage ¶
func (*State) ProtoMessage()
func (*State) XXX_DiscardUnknown ¶
func (m *State) XXX_DiscardUnknown()
func (*State) XXX_Marshal ¶
func (*State) XXX_Unmarshal ¶
type StateResponse ¶
type StateResponse struct { Certificates []*Certificate `protobuf:"bytes,1,rep,name=certificates,proto3" json:"certificates,omitempty"` Notes []*Note `protobuf:"bytes,2,rep,name=notes,proto3" json:"notes,omitempty"` Accusations []*Accusation `protobuf:"bytes,3,rep,name=accusations,proto3" json:"accusations,omitempty"` ExternalGossip []byte `protobuf:"bytes,4,opt,name=externalGossip,proto3" json:"externalGossip,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*StateResponse) Descriptor ¶
func (*StateResponse) Descriptor() ([]byte, []int)
func (*StateResponse) GetAccusations ¶
func (m *StateResponse) GetAccusations() []*Accusation
func (*StateResponse) GetCertificates ¶
func (m *StateResponse) GetCertificates() []*Certificate
func (*StateResponse) GetExternalGossip ¶
func (m *StateResponse) GetExternalGossip() []byte
func (*StateResponse) GetNotes ¶
func (m *StateResponse) GetNotes() []*Note
func (*StateResponse) ProtoMessage ¶
func (*StateResponse) ProtoMessage()
func (*StateResponse) Reset ¶
func (m *StateResponse) Reset()
func (*StateResponse) String ¶
func (m *StateResponse) String() string
func (*StateResponse) XXX_DiscardUnknown ¶
func (m *StateResponse) XXX_DiscardUnknown()
func (*StateResponse) XXX_Marshal ¶
func (m *StateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StateResponse) XXX_Merge ¶
func (m *StateResponse) XXX_Merge(src proto.Message)
func (*StateResponse) XXX_Size ¶
func (m *StateResponse) XXX_Size() int
func (*StateResponse) XXX_Unmarshal ¶
func (m *StateResponse) XXX_Unmarshal(b []byte) error
type Test ¶
type Test struct { Nums []int32 `protobuf:"varint,1,rep,packed,name=nums,proto3" json:"nums,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Test) Descriptor ¶
func (*Test) ProtoMessage ¶
func (*Test) ProtoMessage()
func (*Test) XXX_DiscardUnknown ¶
func (m *Test) XXX_DiscardUnknown()
func (*Test) XXX_Unmarshal ¶
type UnimplementedGossipServer ¶
type UnimplementedGossipServer struct { }
UnimplementedGossipServer can be embedded to have forward compatible implementations.
func (*UnimplementedGossipServer) Messenger ¶
func (*UnimplementedGossipServer) Messenger(ctx context.Context, req *Msg) (*MsgResponse, error)
func (*UnimplementedGossipServer) Spread ¶
func (*UnimplementedGossipServer) Spread(ctx context.Context, req *State) (*StateResponse, error)
func (*UnimplementedGossipServer) Stream ¶
func (*UnimplementedGossipServer) Stream(srv Gossip_StreamServer) error
Click to show internal directories.
Click to hide internal directories.