proto

package
v0.0.0-...-7e24c04 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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) Descriptor() ([]byte, []int)

func (*Data) GetContent

func (m *Data) GetContent() []byte

func (*Data) GetId

func (m *Data) GetId() []byte

func (*Data) ProtoMessage

func (*Data) ProtoMessage()

func (*Data) Reset

func (m *Data) Reset()

func (*Data) String

func (m *Data) String() string

func (*Data) XXX_DiscardUnknown

func (m *Data) XXX_DiscardUnknown()

func (*Data) XXX_Marshal

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

func (*Data) XXX_Merge

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

func (*Data) XXX_Size

func (m *Data) XXX_Size() int

func (*Data) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*Msg) GetContent

func (m *Msg) GetContent() []byte

func (*Msg) GetError

func (m *Msg) GetError() string

func (*Msg) ProtoMessage

func (*Msg) ProtoMessage()

func (*Msg) Reset

func (m *Msg) Reset()

func (*Msg) String

func (m *Msg) String() string

func (*Msg) XXX_DiscardUnknown

func (m *Msg) XXX_DiscardUnknown()

func (*Msg) XXX_Marshal

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

func (*Msg) XXX_Merge

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

func (*Msg) XXX_Size

func (m *Msg) XXX_Size() int

func (*Msg) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*Note) GetEpoch

func (m *Note) GetEpoch() uint64

func (*Note) GetId

func (m *Note) GetId() []byte

func (*Note) GetMask

func (m *Note) GetMask() uint32

func (*Note) GetSignature

func (m *Note) GetSignature() *Signature

func (*Note) ProtoMessage

func (*Note) ProtoMessage()

func (*Note) Reset

func (m *Note) Reset()

func (*Note) String

func (m *Note) String() string

func (*Note) XXX_DiscardUnknown

func (m *Note) XXX_DiscardUnknown()

func (*Note) XXX_Marshal

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

func (*Note) XXX_Merge

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

func (*Note) XXX_Size

func (m *Note) XXX_Size() int

func (*Note) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*Ping) GetNonce

func (m *Ping) GetNonce() []byte

func (*Ping) ProtoMessage

func (*Ping) ProtoMessage()

func (*Ping) Reset

func (m *Ping) Reset()

func (*Ping) String

func (m *Ping) String() string

func (*Ping) XXX_DiscardUnknown

func (m *Ping) XXX_DiscardUnknown()

func (*Ping) XXX_Marshal

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

func (*Ping) XXX_Merge

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

func (*Ping) XXX_Size

func (m *Ping) XXX_Size() int

func (*Ping) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*Pong) GetNonce

func (m *Pong) GetNonce() []byte

func (*Pong) GetSignature

func (m *Pong) GetSignature() *Signature

func (*Pong) ProtoMessage

func (*Pong) ProtoMessage()

func (*Pong) Reset

func (m *Pong) Reset()

func (*Pong) String

func (m *Pong) String() string

func (*Pong) XXX_DiscardUnknown

func (m *Pong) XXX_DiscardUnknown()

func (*Pong) XXX_Marshal

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

func (*Pong) XXX_Merge

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

func (*Pong) XXX_Size

func (m *Pong) XXX_Size() int

func (*Pong) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*Signature) GetR

func (m *Signature) GetR() []byte

func (*Signature) GetS

func (m *Signature) GetS() []byte

func (*Signature) ProtoMessage

func (*Signature) ProtoMessage()

func (*Signature) Reset

func (m *Signature) Reset()

func (*Signature) String

func (m *Signature) String() string

func (*Signature) XXX_DiscardUnknown

func (m *Signature) XXX_DiscardUnknown()

func (*Signature) XXX_Marshal

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

func (*Signature) XXX_Merge

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

func (*Signature) XXX_Size

func (m *Signature) XXX_Size() int

func (*Signature) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*State) GetExistingHosts

func (m *State) GetExistingHosts() map[string]uint64

func (*State) GetExternalGossip

func (m *State) GetExternalGossip() []byte

func (*State) GetOwnNote

func (m *State) GetOwnNote() *Note

func (*State) ProtoMessage

func (*State) ProtoMessage()

func (*State) Reset

func (m *State) Reset()

func (*State) String

func (m *State) String() string

func (*State) XXX_DiscardUnknown

func (m *State) XXX_DiscardUnknown()

func (*State) XXX_Marshal

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

func (*State) XXX_Merge

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

func (*State) XXX_Size

func (m *State) XXX_Size() int

func (*State) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*Test) GetNums

func (m *Test) GetNums() []int32

func (*Test) ProtoMessage

func (*Test) ProtoMessage()

func (*Test) Reset

func (m *Test) Reset()

func (*Test) String

func (m *Test) String() string

func (*Test) XXX_DiscardUnknown

func (m *Test) XXX_DiscardUnknown()

func (*Test) XXX_Marshal

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

func (*Test) XXX_Merge

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

func (*Test) XXX_Size

func (m *Test) XXX_Size() int

func (*Test) XXX_Unmarshal

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

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) Stream

Jump to

Keyboard shortcuts

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