protocol

package
v0.0.0-...-0020f36 Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ChannelType_name = map[int32]string{
		0: "UDP",
	}
	ChannelType_value = map[string]int32{
		"UDP": 0,
	}
)

Enum value maps for ChannelType.

View Source
var File_protocol_protocol_proto protoreflect.FileDescriptor
View Source
var VnetPeer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "VnetPeer",
	HandlerType: (*VnetPeerServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Input",
			Handler:       _VnetPeer_Input_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "protocol/protocol.proto",
}

VnetPeer_ServiceDesc is the grpc.ServiceDesc for VnetPeer service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterVnetPeerServer

func RegisterVnetPeerServer(s grpc.ServiceRegistrar, srv VnetPeerServer)

Types

type Announcement

type Announcement struct {
	Routes []*Route `protobuf:"bytes,1,rep,name=routes,proto3" json:"routes,omitempty"`
	// contains filtered or unexported fields
}

func (*Announcement) Descriptor deprecated

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

Deprecated: Use Announcement.ProtoReflect.Descriptor instead.

func (*Announcement) GetRoutes

func (x *Announcement) GetRoutes() []*Route

func (*Announcement) ProtoMessage

func (*Announcement) ProtoMessage()

func (*Announcement) ProtoReflect

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

func (*Announcement) Reset

func (x *Announcement) Reset()

func (*Announcement) String

func (x *Announcement) String() string

type ChannelRequest

type ChannelRequest struct {
	Type  ChannelType `protobuf:"varint,1,opt,name=type,proto3,enum=ChannelType" json:"type,omitempty"`
	Token []byte      `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*ChannelRequest) Descriptor deprecated

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

Deprecated: Use ChannelRequest.ProtoReflect.Descriptor instead.

func (*ChannelRequest) GetToken

func (x *ChannelRequest) GetToken() []byte

func (*ChannelRequest) GetType

func (x *ChannelRequest) GetType() ChannelType

func (*ChannelRequest) ProtoMessage

func (*ChannelRequest) ProtoMessage()

func (*ChannelRequest) ProtoReflect

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

func (*ChannelRequest) Reset

func (x *ChannelRequest) Reset()

func (*ChannelRequest) String

func (x *ChannelRequest) String() string

type ChannelResponse

type ChannelResponse struct {
	Type  ChannelType `protobuf:"varint,1,opt,name=type,proto3,enum=ChannelType" json:"type,omitempty"`
	Token []byte      `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*ChannelResponse) Descriptor deprecated

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

Deprecated: Use ChannelResponse.ProtoReflect.Descriptor instead.

func (*ChannelResponse) GetToken

func (x *ChannelResponse) GetToken() []byte

func (*ChannelResponse) GetType

func (x *ChannelResponse) GetType() ChannelType

func (*ChannelResponse) ProtoMessage

func (*ChannelResponse) ProtoMessage()

func (*ChannelResponse) ProtoReflect

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

func (*ChannelResponse) Reset

func (x *ChannelResponse) Reset()

func (*ChannelResponse) String

func (x *ChannelResponse) String() string

type ChannelType

type ChannelType int32
const (
	ChannelType_UDP ChannelType = 0
)

func (ChannelType) Descriptor

func (ChannelType) Enum

func (x ChannelType) Enum() *ChannelType

func (ChannelType) EnumDescriptor deprecated

func (ChannelType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ChannelType.Descriptor instead.

func (ChannelType) Number

func (x ChannelType) Number() protoreflect.EnumNumber

func (ChannelType) String

func (x ChannelType) String() string

func (ChannelType) Type

type DistributedConfig

type DistributedConfig struct {
	Version     uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	Certificate []byte `protobuf:"bytes,2,opt,name=certificate,proto3" json:"certificate,omitempty"`
	Content     []byte `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*DistributedConfig) Descriptor deprecated

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

Deprecated: Use DistributedConfig.ProtoReflect.Descriptor instead.

func (*DistributedConfig) GetCertificate

func (x *DistributedConfig) GetCertificate() []byte

func (*DistributedConfig) GetContent

func (x *DistributedConfig) GetContent() []byte

func (*DistributedConfig) GetVersion

func (x *DistributedConfig) GetVersion() uint32

func (*DistributedConfig) ProtoMessage

func (*DistributedConfig) ProtoMessage()

func (*DistributedConfig) ProtoReflect

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

func (*DistributedConfig) Reset

func (x *DistributedConfig) Reset()

func (*DistributedConfig) String

func (x *DistributedConfig) String() string

type Hop

type Hop struct {
	Id      []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Latency uint32 `protobuf:"varint,2,opt,name=latency,proto3" json:"latency,omitempty"`
	// contains filtered or unexported fields
}

func (*Hop) Descriptor deprecated

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

Deprecated: Use Hop.ProtoReflect.Descriptor instead.

func (*Hop) GetId

func (x *Hop) GetId() []byte

func (*Hop) GetLatency

func (x *Hop) GetLatency() uint32

func (*Hop) ProtoMessage

func (*Hop) ProtoMessage()

func (*Hop) ProtoReflect

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

func (*Hop) Reset

func (x *Hop) Reset()

func (*Hop) String

func (x *Hop) String() string

type Message

type Message struct {
	Tag     uint32 `protobuf:"varint,1,opt,name=tag,proto3" json:"tag,omitempty"`
	Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetPayload

func (x *Message) GetPayload() []byte

func (*Message) GetTag

func (x *Message) GetTag() uint32

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type Route

type Route struct {
	Prefix       []byte `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"`
	PrefixLength uint32 `protobuf:"varint,2,opt,name=prefix_length,json=prefixLength,proto3" json:"prefix_length,omitempty"`
	Path         []*Hop `protobuf:"bytes,3,rep,name=path,proto3" json:"path,omitempty"`
	// contains filtered or unexported fields
}

func (*Route) Descriptor deprecated

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

Deprecated: Use Route.ProtoReflect.Descriptor instead.

func (*Route) GetPath

func (x *Route) GetPath() []*Hop

func (*Route) GetPrefix

func (x *Route) GetPrefix() []byte

func (*Route) GetPrefixLength

func (x *Route) GetPrefixLength() uint32

func (*Route) ProtoMessage

func (*Route) ProtoMessage()

func (*Route) ProtoReflect

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

func (*Route) Reset

func (x *Route) Reset()

func (*Route) String

func (x *Route) String() string

type UnimplementedVnetPeerServer

type UnimplementedVnetPeerServer struct {
}

UnimplementedVnetPeerServer must be embedded to have forward compatible implementations.

func (UnimplementedVnetPeerServer) Input

type UnsafeVnetPeerServer

type UnsafeVnetPeerServer interface {
	// contains filtered or unexported methods
}

UnsafeVnetPeerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to VnetPeerServer will result in compilation errors.

type VnetPeerClient

type VnetPeerClient interface {
	Input(ctx context.Context, opts ...grpc.CallOption) (VnetPeer_InputClient, error)
}

VnetPeerClient is the client API for VnetPeer service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewVnetPeerClient

func NewVnetPeerClient(cc grpc.ClientConnInterface) VnetPeerClient

type VnetPeerServer

type VnetPeerServer interface {
	Input(VnetPeer_InputServer) error
	// contains filtered or unexported methods
}

VnetPeerServer is the server API for VnetPeer service. All implementations must embed UnimplementedVnetPeerServer for forward compatibility

type VnetPeer_InputClient

type VnetPeer_InputClient interface {
	Send(*Message) error
	Recv() (*Message, error)
	grpc.ClientStream
}

type VnetPeer_InputServer

type VnetPeer_InputServer interface {
	Send(*Message) error
	Recv() (*Message, error)
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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