internal

package
v0.1.0-beta28-fix20 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AuthorityPath   = flag.String("tls-authority-path", "/etc/oriond/ca.crt", "Path to the certificate authority file")
	CertificatePath = flag.String("tls-certificate-path", "/etc/oriond/identity.crt", "Path to the certificate authority file")
	KeyPath         = flag.String("tls-key-path", "/etc/oriond/identity.key", "Path to the certificate authority file")
)

Functions

func CalculateNonce

func CalculateNonce(
	MemberId uint32,
	FriendlyName string,
	Certificate []byte,
	PrivateKey *ecdsa.PrivateKey,
) (*proto.InitializeRequest, error)

Used to calculate the nonce and sign it

func CalculateNonceBytes

func CalculateNonceBytes(MemberId uint32, FriendlyName string, time int64) []byte

Calculate the nonce bytes

func CreateCertPoolFromPEM

func CreateCertPoolFromPEM(PEMData []byte) (*x509.CertPool, error)

Parse a pem file and adds all the pem-encoded certificates to a cert-pool

func GetSelfAddress

func GetSelfAddress(self uint32, other uint32) (*net.IPNet, *net.IPNet, error)

func LoadTLS

func LoadTLS(clientCerts bool) (credentials.TransportCredentials, error)

func ParsePEMCertificate

func ParsePEMCertificate(Certificate []byte) (*x509.Certificate, error)

Types

type LockableTasks

type LockableTasks struct {
	// contains filtered or unexported fields
}

func NewLockableTasks

func NewLockableTasks(tasksCount int) LockableTasks

func (*LockableTasks) AssignSessionId

func (r *LockableTasks) AssignSessionId(ctx context.Context) (*Task, error)

type Task

type Task struct {
	Id int
	// contains filtered or unexported fields
}

func (Task) Release

func (r Task) Release()

type WireguardInterface

type WireguardInterface struct {
	WgLink WireguardNetLink
	// contains filtered or unexported fields
}

func NewWireguardInterface

func NewWireguardInterface(wg *wgctrl.Client, interfaceAttrs *netlink.LinkAttrs, configuration wgtypes.Config) (*WireguardInterface, error)

func (*WireguardInterface) Dispose

func (c *WireguardInterface) Dispose()

func (*WireguardInterface) SetAddress

func (c *WireguardInterface) SetAddress(ip *net.IPNet) error

func (*WireguardInterface) SetPeers

func (c *WireguardInterface) SetPeers(wg *wgctrl.Client, peers []wgtypes.PeerConfig) error
type WireguardNetLink struct {
	netlink.Link
	InterfaceAttrs *netlink.LinkAttrs
}

func (WireguardNetLink) Attrs

func (r WireguardNetLink) Attrs() *netlink.LinkAttrs

func (WireguardNetLink) Type

func (r WireguardNetLink) Type() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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