pdisc

package
v0.5.9 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PeerDescriptionChange_name = map[int32]string{
		0: "ADD",
		1: "REMOVE",
		2: "UPDATE",
	}
	PeerDescriptionChange_value = map[string]int32{
		"ADD":    0,
		"REMOVE": 1,
		"UPDATE": 2,
	}
)

Enum value maps for PeerDescriptionChange.

View Source
var File_feature_pdisc_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type PeerAddresses

type PeerAddresses struct {
	Addresses []*core.IPAddress `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"`
	// contains filtered or unexported fields
}

func (*PeerAddresses) Descriptor deprecated

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

Deprecated: Use PeerAddresses.ProtoReflect.Descriptor instead.

func (*PeerAddresses) GetAddresses

func (x *PeerAddresses) GetAddresses() []*core.IPAddress

func (*PeerAddresses) ProtoMessage

func (*PeerAddresses) ProtoMessage()

func (*PeerAddresses) ProtoReflect

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

func (*PeerAddresses) Reset

func (x *PeerAddresses) Reset()

func (*PeerAddresses) String

func (x *PeerAddresses) String() string

type PeerDescription

type PeerDescription struct {
	Change PeerDescriptionChange `protobuf:"varint,1,opt,name=change,proto3,enum=cunicu.pdisc.PeerDescriptionChange" json:"change,omitempty"`
	// Hostname of the node
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// Public WireGuard Curve25519 key
	PublicKey []byte `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// A new public WireGuard Curve25519 key
	// Only valid for change == PEER_UPDATE
	PublicKeyNew []byte `protobuf:"bytes,4,opt,name=public_key_new,json=publicKeyNew,proto3" json:"public_key_new,omitempty"`
	// List of allowed IPs
	AllowedIps []string `protobuf:"bytes,5,rep,name=allowed_ips,json=allowedIps,proto3" json:"allowed_ips,omitempty"`
	// cunicu build information
	BuildInfo *proto.BuildInfo `protobuf:"bytes,6,opt,name=build_info,json=buildInfo,proto3" json:"build_info,omitempty"`
	// IP to Hostname mapping
	Hosts map[string]*PeerAddresses `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

A PeerDescription is an announcement of a peer which is distributed to

func (*PeerDescription) Config

func (pd *PeerDescription) Config() wgtypes.PeerConfig

func (*PeerDescription) Descriptor deprecated

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

Deprecated: Use PeerDescription.ProtoReflect.Descriptor instead.

func (*PeerDescription) GetAllowedIps

func (x *PeerDescription) GetAllowedIps() []string

func (*PeerDescription) GetBuildInfo

func (x *PeerDescription) GetBuildInfo() *proto.BuildInfo

func (*PeerDescription) GetChange

func (x *PeerDescription) GetChange() PeerDescriptionChange

func (*PeerDescription) GetHosts

func (x *PeerDescription) GetHosts() map[string]*PeerAddresses

func (*PeerDescription) GetName

func (x *PeerDescription) GetName() string

func (*PeerDescription) GetPublicKey

func (x *PeerDescription) GetPublicKey() []byte

func (*PeerDescription) GetPublicKeyNew

func (x *PeerDescription) GetPublicKeyNew() []byte

func (*PeerDescription) ProtoMessage

func (*PeerDescription) ProtoMessage()

func (*PeerDescription) ProtoReflect

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

func (*PeerDescription) Reset

func (x *PeerDescription) Reset()

func (*PeerDescription) String

func (x *PeerDescription) String() string

type PeerDescriptionChange

type PeerDescriptionChange int32
const (
	PeerDescriptionChange_ADD    PeerDescriptionChange = 0
	PeerDescriptionChange_REMOVE PeerDescriptionChange = 1
	PeerDescriptionChange_UPDATE PeerDescriptionChange = 2
)

func (PeerDescriptionChange) Descriptor

func (PeerDescriptionChange) Enum

func (PeerDescriptionChange) EnumDescriptor deprecated

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

Deprecated: Use PeerDescriptionChange.Descriptor instead.

func (PeerDescriptionChange) Number

func (PeerDescriptionChange) String

func (x PeerDescriptionChange) String() string

func (PeerDescriptionChange) Type

Jump to

Keyboard shortcuts

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