proto

package
v0.0.0-...-fa26ab0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2020 License: Apache-2.0, BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_autopeering_selection_proto_message_proto protoreflect.FileDescriptor

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"`
	// contains filtered or unexported fields
}

func (*PeeringDrop) Descriptor deprecated

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

Deprecated: Use PeeringDrop.ProtoReflect.Descriptor instead.

func (*PeeringDrop) GetTimestamp

func (x *PeeringDrop) GetTimestamp() int64

func (*PeeringDrop) Name

func (x *PeeringDrop) Name() string

func (*PeeringDrop) ProtoMessage

func (*PeeringDrop) ProtoMessage()

func (*PeeringDrop) ProtoReflect

func (x *PeeringDrop) ProtoReflect() protoreflect.Message

func (*PeeringDrop) Reset

func (x *PeeringDrop) Reset()

func (*PeeringDrop) String

func (x *PeeringDrop) String() string

func (*PeeringDrop) Type

func (x *PeeringDrop) Type() MType

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"`
	// contains filtered or unexported fields
}

func (*PeeringRequest) Descriptor deprecated

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

Deprecated: Use PeeringRequest.ProtoReflect.Descriptor instead.

func (*PeeringRequest) GetSalt

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

func (*PeeringRequest) GetTimestamp

func (x *PeeringRequest) GetTimestamp() int64

func (*PeeringRequest) Name

func (x *PeeringRequest) Name() string

func (*PeeringRequest) ProtoMessage

func (*PeeringRequest) ProtoMessage()

func (*PeeringRequest) ProtoReflect

func (x *PeeringRequest) ProtoReflect() protoreflect.Message

func (*PeeringRequest) Reset

func (x *PeeringRequest) Reset()

func (*PeeringRequest) String

func (x *PeeringRequest) String() string

func (*PeeringRequest) Type

func (x *PeeringRequest) Type() MType

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"`
	// contains filtered or unexported fields
}

func (*PeeringResponse) Descriptor deprecated

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

Deprecated: Use PeeringResponse.ProtoReflect.Descriptor instead.

func (*PeeringResponse) GetReqHash

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

func (*PeeringResponse) GetStatus

func (x *PeeringResponse) GetStatus() bool

func (*PeeringResponse) Name

func (x *PeeringResponse) Name() string

func (*PeeringResponse) ProtoMessage

func (*PeeringResponse) ProtoMessage()

func (*PeeringResponse) ProtoReflect

func (x *PeeringResponse) ProtoReflect() protoreflect.Message

func (*PeeringResponse) Reset

func (x *PeeringResponse) Reset()

func (*PeeringResponse) String

func (x *PeeringResponse) String() string

func (*PeeringResponse) Type

func (x *PeeringResponse) Type() MType

Jump to

Keyboard shortcuts

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