proto

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: Apache-2.0, BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MType

type MType = server.MType

MType is the type of message type enum.

const (
	MPeeringRequest MType = 20 + iota
	MPeeringResponse
	MPeeringDrop
)

An enum for the different message types.

type Message

type Message interface {
	proto.Message

	// Name returns the name of the corresponding message type for debugging.
	Name() string
	// Type returns the type of the corresponding message as an enum.
	Type() MType
}

Message extends the proto.Message interface with additional util functions.

type PeeringDrop

type PeeringDrop struct {
	// unix time
	Timestamp            int64    `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PeeringDrop) Descriptor

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

func (*PeeringDrop) GetTimestamp

func (m *PeeringDrop) GetTimestamp() int64

func (*PeeringDrop) Name

func (m *PeeringDrop) Name() string

func (*PeeringDrop) ProtoMessage

func (*PeeringDrop) ProtoMessage()

func (*PeeringDrop) Reset

func (m *PeeringDrop) Reset()

func (*PeeringDrop) String

func (m *PeeringDrop) String() string

func (*PeeringDrop) Type

func (m *PeeringDrop) Type() MType

func (*PeeringDrop) XXX_DiscardUnknown

func (m *PeeringDrop) XXX_DiscardUnknown()

func (*PeeringDrop) XXX_Marshal

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

func (*PeeringDrop) XXX_Merge

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

func (*PeeringDrop) XXX_Size

func (m *PeeringDrop) XXX_Size() int

func (*PeeringDrop) XXX_Unmarshal

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

type PeeringRequest

type PeeringRequest struct {
	// unix time
	Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// salt of the requester
	Salt                 *proto1.Salt `protobuf:"bytes,2,opt,name=salt,proto3" json:"salt,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*PeeringRequest) Descriptor

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

func (*PeeringRequest) GetSalt

func (m *PeeringRequest) GetSalt() *proto1.Salt

func (*PeeringRequest) GetTimestamp

func (m *PeeringRequest) GetTimestamp() int64

func (*PeeringRequest) Name

func (m *PeeringRequest) Name() string

func (*PeeringRequest) ProtoMessage

func (*PeeringRequest) ProtoMessage()

func (*PeeringRequest) Reset

func (m *PeeringRequest) Reset()

func (*PeeringRequest) String

func (m *PeeringRequest) String() string

func (*PeeringRequest) Type

func (m *PeeringRequest) Type() MType

func (*PeeringRequest) XXX_DiscardUnknown

func (m *PeeringRequest) XXX_DiscardUnknown()

func (*PeeringRequest) XXX_Marshal

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

func (*PeeringRequest) XXX_Merge

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

func (*PeeringRequest) XXX_Size

func (m *PeeringRequest) XXX_Size() int

func (*PeeringRequest) XXX_Unmarshal

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

type PeeringResponse

type PeeringResponse struct {
	// hash of the corresponding request
	ReqHash []byte `protobuf:"bytes,1,opt,name=req_hash,json=reqHash,proto3" json:"req_hash,omitempty"`
	// response of a peering request
	Status               bool     `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PeeringResponse) Descriptor

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

func (*PeeringResponse) GetReqHash

func (m *PeeringResponse) GetReqHash() []byte

func (*PeeringResponse) GetStatus

func (m *PeeringResponse) GetStatus() bool

func (*PeeringResponse) Name

func (m *PeeringResponse) Name() string

func (*PeeringResponse) ProtoMessage

func (*PeeringResponse) ProtoMessage()

func (*PeeringResponse) Reset

func (m *PeeringResponse) Reset()

func (*PeeringResponse) String

func (m *PeeringResponse) String() string

func (*PeeringResponse) Type

func (m *PeeringResponse) Type() MType

func (*PeeringResponse) XXX_DiscardUnknown

func (m *PeeringResponse) XXX_DiscardUnknown()

func (*PeeringResponse) XXX_Marshal

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

func (*PeeringResponse) XXX_Merge

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

func (*PeeringResponse) XXX_Size

func (m *PeeringResponse) XXX_Size() int

func (*PeeringResponse) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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