wgevents

package module
v0.0.0-...-f611d03 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Overview

Package wgevents is a logger able to turn format strings and args passed to the logger methods into concrete events. This is useful for structured logging as it allows arguments to be logged as separate fields. Support for slog.Logger is build in.

This package is a separate module to pin this logger to a version of wireguard-go. This is needed since messages logged by wireguard-go may change without notice. Events can be added/removed/updated by editing internal/events-generate/events.yml and regenerating `events_generated.go`.

Code generated by events-generate; DO NOT EDIT.

Index

Constants

View Source
const (
	FormatErrorfAssumingDefaultMTU                   = "Trouble determining MTU, assuming default: %v"
	FormatErrorfBindCloseFailed                      = "Bind close failed: %v"
	FormatVerbosefBindUpdated                        = "UDP bind has been updated"
	FormatVerbosefCookieResponseInvalid              = "Could not decrypt invalid cookie response"
	FormatErrorfCreateCookieReplyFailed              = "Failed to create cookie reply: %v"
	FormatErrorfCreateInitiationMessageFailed        = "%v - Failed to create initiation message: %v"
	FormatErrorfCreateResponseMessageFailed          = "%v - Failed to create response message: %v"
	FormatVerbosefDecodeCookieReplyFailed            = "Failed to decode cookie reply"
	FormatVerbosefDecryptionWorkerStopped            = "Routine: decryption worker %d - stopped"
	FormatErrorfDeriveKeypairFailed                  = "%v - Failed to derive keypair: %v"
	FormatVerbosefDeviceClosed                       = "Device closed"
	FormatVerbosefDeviceClosing                      = "Device closing"
	FormatVerbosefDroppedPacketsFromMultiSegmentRead = "Dropped some packets from multi-segment read: %v"
	FormatVerbosefEventWorkerStarted                 = "Routine: event worker - started"
	FormatVerbosefEventWorkerStopped                 = "Routine: event worker - stopped"
	FormatVerbosefHandshakeDidNotComplete            = "%s - Handshake did not complete after %d attempts, giving up"
	FormatVerbosefHandshakeFlood                     = "%v - ConsumeMessageInitiation: handshake flood"
	FormatVerbosefHandshakeReplay                    = "%v - ConsumeMessageInitiation: handshake replay @ %v"
	FormatErrorfHandshakeSendFailed                  = "%v - Failed to send handshake response: %v"
	FormatVerbosefIPv4PacketDisallowed               = "IPv4 packet with disallowed source address from %v"
	FormatVerbosefIPv6PacketDisallowed               = "IPv6 packet with disallowed source address from %v"
	FormatErrorfInitiationMessageDecodeFailed        = "Failed to decode initiation message"
	FormatVerbosefInterfaceCloseIgnoreRequestedState = "Interface closed, ignored requested state %s"
	FormatVerbosefInterfaceDownRequested             = "Interface down requested"
	FormatVerbosefInterfaceStateChanged              = "Interface state was %s, requested %s, now %s"
	FormatVerbosefInterfaceUpRequested               = "Interface up requested"
	FormatVerbosefInvalidMAC1                        = "Received packet with invalid mac1"
	FormatErrorfInvalidOperation                     = "invalid UAPI operation: %v"
	FormatErrorfInvalidPacketInHandshakeQueue        = "Invalid packet ended up in the handshake queue"
	FormatErrorfLoadMTUFailed                        = "Failed to load updated MTU of device: %v"
	FormatVerbosefMTUTooLarge                        = "MTU updated: %v (too large, capped at %v)"
	FormatVerbosefMTUUpdated                         = "MTU updated: %v"
	FormatVerbosefMessageUnknownType                 = "Received message with unknown type"
	FormatErrorfNegativeMTU                          = "MTU not updated to negative value: %v"
	FormatErrorfPacketDataSendFailed                 = "%v - Failed to send data packets: %v"
	FormatVerbosefPacketIPVersionInvalid             = "Packet with invalid IP version from %v"
	FormatVerbosefPacketIPVersionUnknown             = "Received packet with unknown IP version"
	FormatVerbosefPacketReceiveFailed                = "Failed to receive %s packet: %v"
	FormatVerbosefPeerStarting                       = "%v - Starting"
	FormatVerbosefPeerStopping                       = "%v - Stopping"
	FormatVerbosefReceivedHandshakeInitiation        = "%v - Received handshake initiation"
	FormatVerbosefReceivedHandshakeResponse          = "%v - Received handshake response"
	FormatVerbosefReceivedInvalidInitiation          = "Received invalid initiation message from %s"
	FormatVerbosefReceivedInvalidResponse            = "Received invalid response message from %s"
	FormatVerbosefReceivingCookieResponse            = "Receiving cookie response from %s"
	FormatVerbosefReceivingKeepalivePacket           = "%v - Receiving keepalive packet"
	FormatVerbosefRemovingAllKeys                    = "%s - Removing all keys, since we haven't received a new one in %d seconds"
	FormatErrorfResponseMessageDecodeFailed          = "Failed to decode response message"
	FormatVerbosefRetryingHandshake                  = "%s - Handshake did not complete after %d seconds, retrying (try %d)"
	FormatVerbosefRetryingHandshakeNoResponse        = "%s - Retrying handshake because we stopped hearing back after %d seconds"
	FormatVerbosefSendCookieDenied                   = "Sending cookie response for denied handshake message for %v"
	FormatErrorfSendHandshakeInitiationFailed        = "%v - Failed to send handshake initiation: %v"
	FormatVerbosefSendingHandshakeInitiation         = "%v - Sending handshake initiation"
	FormatVerbosefSendingHandshakeResponse           = "%v - Sending handshake response"
	FormatVerbosefSendingKeepalivePacket             = "%v - Sending keepalive packet"
	FormatVerbosefSequentialReaderStopped            = "%v - Routine: sequential sender - stopped"
	FormatVerbosefSequentialReceiverStarted          = "%v - Routine: sequential receiver - started"
	FormatVerbosefSequentialReceiverStopped          = "%v - Routine: sequential receiver - stopped"
	FormatVerbosefSequentialSenderStarted            = "%v - Routine: sequential sender - started"
	FormatVerbosefStartedDecryptionWorker            = "Routine: decryption worker %d - started"
	FormatVerbosefStartedEncryptionWorker            = "Routine: encryption worker %d - started"
	FormatVerbosefStartedHandshakeWorker             = "Routine: handshake worker %d - started"
	FormatVerbosefStartedReceivingIncoming           = "Routine: receive incoming %s - stopped"
	FormatVerbosefStoppedEncryptionWorker            = "Routine: encryption worker %d - stopped"
	FormatVerbosefStoppedHandshakeWorker             = "Routine: handshake worker %d - stopped"
	FormatVerbosefStoppedReceivingIncoming           = "Routine: receive incoming %s - started"
	FormatVerbosefTUNReaderStarted                   = "Routine: TUN reader - started"
	FormatVerbosefTUNReaderStopped                   = "Routine: TUN reader - stopped"
	FormatErrorfTUNWriteFailed                       = "Failed to write packets to TUN device: %v"
	FormatErrorfTunPacketReadFailed                  = "Failed to read packet from TUN device: %v"
	FormatVerbosefUAPIAddingAllowedIP                = "%v - UAPI: Adding allowedip"
	FormatVerbosefUAPICreated                        = "%v - UAPI: Created"
	FormatVerbosefUAPIRemovingAllAllowedIPs          = "%v - UAPI: Removing all allowedips"
	FormatVerbosefUAPIRemovingAllPeers               = "UAPI: Removing all peers"
	FormatVerbosefUAPIRemovingPeer                   = "%v - UAPI: Removing"
	FormatVerbosefUAPIUpdatingEndpoint               = "%v - UAPI: Updating endpoint"
	FormatVerbosefUAPIUpdatingFWMark                 = "UAPI: Updating fwmark"
	FormatVerbosefUAPIUpdatingListenPort             = "UAPI: Updating listen port"
	FormatVerbosefUAPIUpdatingPersistentKeepalive    = "%v - UAPI: Updating persistent keepalive interval"
	FormatVerbosefUAPIUpdatingPresharedKey           = "%v - UAPI: Updating preshared key"
	FormatVerbosefUAPIUpdatingPrivateKey             = "UAPI: Updating private key"
	FormatVerbosefUDPGSODisabled                     = "disabled UDP GSO on %s, NIC(s) may not support checksum offload"
	FormatErrorfUpdateBind                           = "Unable to update bind: %v"
	FormatErrorfValue                                = "%v"
)

Variables

This section is empty.

Functions

func Events

func Events(fn func(Event)) *device.Logger

Events creates a new logger that can recognize the names and types of arguments passed to logging methods. fn is called for each event logged. Since Event is an interface there is an underlying type for each known event. If the event is unknown EventAny is used.

Types

type Event

type Event interface {
	Nice() string
	Format() string
	Args() []any
	Slog(*slog.Logger)
	IsErrorf() bool
}

Event is a generic even emitted from the logger. Use a `switch v := v.(type) {` to filter values and gain acces to arguments.

type EventAny

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

EventAny is an unrecognized event emitted from the logger.

func (*EventAny) Args

func (e *EventAny) Args() []any

Args returns the args passed to the logger.

func (*EventAny) Format

func (e *EventAny) Format() string

Format returns the format strings passed to the logger.

func (*EventAny) IsErrorf

func (e *EventAny) IsErrorf() bool

IsErrorf returns if this was logged with the errorf method.

func (*EventAny) Nice

func (e *EventAny) Nice() string

Nice returns the result of foramtting EventAny.Format with EventAny.Args.

func (*EventAny) Slog

func (e *EventAny) Slog(l *slog.Logger)

Slog prints this event to a slog.Logger.

type EventAssumingDefaultMTU

type EventAssumingDefaultMTU struct {
	Err error
}

EventAssumingDefaultMTU is an errorf event recognized by the format string "Trouble determining MTU, assuming default: %v".

func (*EventAssumingDefaultMTU) Args

func (e *EventAssumingDefaultMTU) Args() []any

func (*EventAssumingDefaultMTU) Format

func (*EventAssumingDefaultMTU) Format() string

func (*EventAssumingDefaultMTU) IsErrorf

func (e *EventAssumingDefaultMTU) IsErrorf() bool

func (*EventAssumingDefaultMTU) Nice

func (*EventAssumingDefaultMTU) Slog

func (e *EventAssumingDefaultMTU) Slog(l *slog.Logger)

type EventBindCloseFailed

type EventBindCloseFailed struct {
	Err error
}

EventBindCloseFailed is an errorf event recognized by the format string "Bind close failed: %v".

func (*EventBindCloseFailed) Args

func (e *EventBindCloseFailed) Args() []any

func (*EventBindCloseFailed) Format

func (*EventBindCloseFailed) Format() string

func (*EventBindCloseFailed) IsErrorf

func (e *EventBindCloseFailed) IsErrorf() bool

func (*EventBindCloseFailed) Nice

func (*EventBindCloseFailed) Nice() string

func (*EventBindCloseFailed) Slog

func (e *EventBindCloseFailed) Slog(l *slog.Logger)

type EventBindUpdated

type EventBindUpdated struct{}

EventBindUpdated is an verbosef event recognized by the format string "UDP bind has been updated".

func (*EventBindUpdated) Args

func (e *EventBindUpdated) Args() []any

func (*EventBindUpdated) Format

func (*EventBindUpdated) Format() string

func (*EventBindUpdated) IsErrorf

func (e *EventBindUpdated) IsErrorf() bool

func (*EventBindUpdated) Nice

func (*EventBindUpdated) Nice() string

func (*EventBindUpdated) Slog

func (e *EventBindUpdated) Slog(l *slog.Logger)

type EventCookieResponseInvalid

type EventCookieResponseInvalid struct{}

EventCookieResponseInvalid is an verbosef event recognized by the format string "Could not decrypt invalid cookie response".

func (*EventCookieResponseInvalid) Args

func (e *EventCookieResponseInvalid) Args() []any

func (*EventCookieResponseInvalid) Format

func (*EventCookieResponseInvalid) IsErrorf

func (e *EventCookieResponseInvalid) IsErrorf() bool

func (*EventCookieResponseInvalid) Nice

func (*EventCookieResponseInvalid) Slog

type EventCreateCookieReplyFailed

type EventCreateCookieReplyFailed struct {
	Err error
}

EventCreateCookieReplyFailed is an errorf event recognized by the format string "Failed to create cookie reply: %v".

func (*EventCreateCookieReplyFailed) Args

func (e *EventCreateCookieReplyFailed) Args() []any

func (*EventCreateCookieReplyFailed) Format

func (*EventCreateCookieReplyFailed) IsErrorf

func (e *EventCreateCookieReplyFailed) IsErrorf() bool

func (*EventCreateCookieReplyFailed) Nice

func (*EventCreateCookieReplyFailed) Slog

type EventCreateInitiationMessageFailed

type EventCreateInitiationMessageFailed struct {
	Peer *device.Peer
	Err  error
}

EventCreateInitiationMessageFailed is an errorf event recognized by the format string "%v - Failed to create initiation message: %v".

func (*EventCreateInitiationMessageFailed) Args

func (*EventCreateInitiationMessageFailed) Format

func (*EventCreateInitiationMessageFailed) IsErrorf

func (*EventCreateInitiationMessageFailed) Nice

func (*EventCreateInitiationMessageFailed) Slog

type EventCreateResponseMessageFailed

type EventCreateResponseMessageFailed struct {
	Peer *device.Peer
	Err  error
}

EventCreateResponseMessageFailed is an errorf event recognized by the format string "%v - Failed to create response message: %v".

func (*EventCreateResponseMessageFailed) Args

func (*EventCreateResponseMessageFailed) Format

func (*EventCreateResponseMessageFailed) IsErrorf

func (e *EventCreateResponseMessageFailed) IsErrorf() bool

func (*EventCreateResponseMessageFailed) Nice

func (*EventCreateResponseMessageFailed) Slog

type EventDecodeCookieReplyFailed

type EventDecodeCookieReplyFailed struct{}

EventDecodeCookieReplyFailed is an verbosef event recognized by the format string "Failed to decode cookie reply".

func (*EventDecodeCookieReplyFailed) Args

func (e *EventDecodeCookieReplyFailed) Args() []any

func (*EventDecodeCookieReplyFailed) Format

func (*EventDecodeCookieReplyFailed) IsErrorf

func (e *EventDecodeCookieReplyFailed) IsErrorf() bool

func (*EventDecodeCookieReplyFailed) Nice

func (*EventDecodeCookieReplyFailed) Slog

type EventDecryptionWorkerStopped

type EventDecryptionWorkerStopped struct {
	ID int
}

EventDecryptionWorkerStopped is an verbosef event recognized by the format string "Routine: decryption worker %d - stopped".

func (*EventDecryptionWorkerStopped) Args

func (e *EventDecryptionWorkerStopped) Args() []any

func (*EventDecryptionWorkerStopped) Format

func (*EventDecryptionWorkerStopped) IsErrorf

func (e *EventDecryptionWorkerStopped) IsErrorf() bool

func (*EventDecryptionWorkerStopped) Nice

func (*EventDecryptionWorkerStopped) Slog

type EventDeriveKeypairFailed

type EventDeriveKeypairFailed struct {
	Peer *device.Peer
	Err  error
}

EventDeriveKeypairFailed is an errorf event recognized by the format string "%v - Failed to derive keypair: %v".

func (*EventDeriveKeypairFailed) Args

func (e *EventDeriveKeypairFailed) Args() []any

func (*EventDeriveKeypairFailed) Format

func (*EventDeriveKeypairFailed) Format() string

func (*EventDeriveKeypairFailed) IsErrorf

func (e *EventDeriveKeypairFailed) IsErrorf() bool

func (*EventDeriveKeypairFailed) Nice

func (*EventDeriveKeypairFailed) Slog

func (e *EventDeriveKeypairFailed) Slog(l *slog.Logger)

type EventDeviceClosed

type EventDeviceClosed struct{}

EventDeviceClosed is an verbosef event recognized by the format string "Device closed".

func (*EventDeviceClosed) Args

func (e *EventDeviceClosed) Args() []any

func (*EventDeviceClosed) Format

func (*EventDeviceClosed) Format() string

func (*EventDeviceClosed) IsErrorf

func (e *EventDeviceClosed) IsErrorf() bool

func (*EventDeviceClosed) Nice

func (*EventDeviceClosed) Nice() string

func (*EventDeviceClosed) Slog

func (e *EventDeviceClosed) Slog(l *slog.Logger)

type EventDeviceClosing

type EventDeviceClosing struct{}

EventDeviceClosing is an verbosef event recognized by the format string "Device closing".

func (*EventDeviceClosing) Args

func (e *EventDeviceClosing) Args() []any

func (*EventDeviceClosing) Format

func (*EventDeviceClosing) Format() string

func (*EventDeviceClosing) IsErrorf

func (e *EventDeviceClosing) IsErrorf() bool

func (*EventDeviceClosing) Nice

func (*EventDeviceClosing) Nice() string

func (*EventDeviceClosing) Slog

func (e *EventDeviceClosing) Slog(l *slog.Logger)

type EventDroppedPacketsFromMultiSegmentRead

type EventDroppedPacketsFromMultiSegmentRead struct {
	Err error
}

EventDroppedPacketsFromMultiSegmentRead is an verbosef event recognized by the format string "Dropped some packets from multi-segment read: %v".

func (*EventDroppedPacketsFromMultiSegmentRead) Args

func (*EventDroppedPacketsFromMultiSegmentRead) Format

func (*EventDroppedPacketsFromMultiSegmentRead) IsErrorf

func (*EventDroppedPacketsFromMultiSegmentRead) Nice

func (*EventDroppedPacketsFromMultiSegmentRead) Slog

type EventEventWorkerStarted

type EventEventWorkerStarted struct{}

EventEventWorkerStarted is an verbosef event recognized by the format string "Routine: event worker - started".

func (*EventEventWorkerStarted) Args

func (e *EventEventWorkerStarted) Args() []any

func (*EventEventWorkerStarted) Format

func (*EventEventWorkerStarted) Format() string

func (*EventEventWorkerStarted) IsErrorf

func (e *EventEventWorkerStarted) IsErrorf() bool

func (*EventEventWorkerStarted) Nice

func (*EventEventWorkerStarted) Slog

func (e *EventEventWorkerStarted) Slog(l *slog.Logger)

type EventEventWorkerStopped

type EventEventWorkerStopped struct{}

EventEventWorkerStopped is an verbosef event recognized by the format string "Routine: event worker - stopped".

func (*EventEventWorkerStopped) Args

func (e *EventEventWorkerStopped) Args() []any

func (*EventEventWorkerStopped) Format

func (*EventEventWorkerStopped) Format() string

func (*EventEventWorkerStopped) IsErrorf

func (e *EventEventWorkerStopped) IsErrorf() bool

func (*EventEventWorkerStopped) Nice

func (*EventEventWorkerStopped) Slog

func (e *EventEventWorkerStopped) Slog(l *slog.Logger)

type EventHandshakeDidNotComplete

type EventHandshakeDidNotComplete struct {
	Peer     *device.Peer
	Attempts int
}

EventHandshakeDidNotComplete is an verbosef event recognized by the format string "%s - Handshake did not complete after %d attempts, giving up".

func (*EventHandshakeDidNotComplete) Args

func (e *EventHandshakeDidNotComplete) Args() []any

func (*EventHandshakeDidNotComplete) Format

func (*EventHandshakeDidNotComplete) IsErrorf

func (e *EventHandshakeDidNotComplete) IsErrorf() bool

func (*EventHandshakeDidNotComplete) Nice

func (*EventHandshakeDidNotComplete) Slog

type EventHandshakeFlood

type EventHandshakeFlood struct {
	Peer *device.Peer
}

EventHandshakeFlood is an verbosef event recognized by the format string "%v - ConsumeMessageInitiation: handshake flood".

func (*EventHandshakeFlood) Args

func (e *EventHandshakeFlood) Args() []any

func (*EventHandshakeFlood) Format

func (*EventHandshakeFlood) Format() string

func (*EventHandshakeFlood) IsErrorf

func (e *EventHandshakeFlood) IsErrorf() bool

func (*EventHandshakeFlood) Nice

func (*EventHandshakeFlood) Nice() string

func (*EventHandshakeFlood) Slog

func (e *EventHandshakeFlood) Slog(l *slog.Logger)

type EventHandshakeReplay

type EventHandshakeReplay struct {
	Peer      *device.Peer
	Timestamp tai64n.Timestamp
}

EventHandshakeReplay is an verbosef event recognized by the format string "%v - ConsumeMessageInitiation: handshake replay @ %v".

func (*EventHandshakeReplay) Args

func (e *EventHandshakeReplay) Args() []any

func (*EventHandshakeReplay) Format

func (*EventHandshakeReplay) Format() string

func (*EventHandshakeReplay) IsErrorf

func (e *EventHandshakeReplay) IsErrorf() bool

func (*EventHandshakeReplay) Nice

func (*EventHandshakeReplay) Nice() string

func (*EventHandshakeReplay) Slog

func (e *EventHandshakeReplay) Slog(l *slog.Logger)

type EventHandshakeSendFailed

type EventHandshakeSendFailed struct {
	Peer *device.Peer
	Err  error
}

EventHandshakeSendFailed is an errorf event recognized by the format string "%v - Failed to send handshake response: %v".

func (*EventHandshakeSendFailed) Args

func (e *EventHandshakeSendFailed) Args() []any

func (*EventHandshakeSendFailed) Format

func (*EventHandshakeSendFailed) Format() string

func (*EventHandshakeSendFailed) IsErrorf

func (e *EventHandshakeSendFailed) IsErrorf() bool

func (*EventHandshakeSendFailed) Nice

func (*EventHandshakeSendFailed) Slog

func (e *EventHandshakeSendFailed) Slog(l *slog.Logger)

type EventIPv4PacketDisallowed

type EventIPv4PacketDisallowed struct {
	Peer *device.Peer
}

EventIPv4PacketDisallowed is an verbosef event recognized by the format string "IPv4 packet with disallowed source address from %v".

func (*EventIPv4PacketDisallowed) Args

func (e *EventIPv4PacketDisallowed) Args() []any

func (*EventIPv4PacketDisallowed) Format

func (*EventIPv4PacketDisallowed) IsErrorf

func (e *EventIPv4PacketDisallowed) IsErrorf() bool

func (*EventIPv4PacketDisallowed) Nice

func (*EventIPv4PacketDisallowed) Slog

type EventIPv6PacketDisallowed

type EventIPv6PacketDisallowed struct {
	Peer *device.Peer
}

EventIPv6PacketDisallowed is an verbosef event recognized by the format string "IPv6 packet with disallowed source address from %v".

func (*EventIPv6PacketDisallowed) Args

func (e *EventIPv6PacketDisallowed) Args() []any

func (*EventIPv6PacketDisallowed) Format

func (*EventIPv6PacketDisallowed) IsErrorf

func (e *EventIPv6PacketDisallowed) IsErrorf() bool

func (*EventIPv6PacketDisallowed) Nice

func (*EventIPv6PacketDisallowed) Slog

type EventInitiationMessageDecodeFailed

type EventInitiationMessageDecodeFailed struct{}

EventInitiationMessageDecodeFailed is an errorf event recognized by the format string "Failed to decode initiation message".

func (*EventInitiationMessageDecodeFailed) Args

func (*EventInitiationMessageDecodeFailed) Format

func (*EventInitiationMessageDecodeFailed) IsErrorf

func (*EventInitiationMessageDecodeFailed) Nice

func (*EventInitiationMessageDecodeFailed) Slog

type EventInterfaceCloseIgnoreRequestedState

type EventInterfaceCloseIgnoreRequestedState struct {
	Want fmt.Stringer
}

EventInterfaceCloseIgnoreRequestedState is an verbosef event recognized by the format string "Interface closed, ignored requested state %s".

func (*EventInterfaceCloseIgnoreRequestedState) Args

func (*EventInterfaceCloseIgnoreRequestedState) Format

func (*EventInterfaceCloseIgnoreRequestedState) IsErrorf

func (*EventInterfaceCloseIgnoreRequestedState) Nice

func (*EventInterfaceCloseIgnoreRequestedState) Slog

type EventInterfaceDownRequested

type EventInterfaceDownRequested struct{}

EventInterfaceDownRequested is an verbosef event recognized by the format string "Interface down requested".

func (*EventInterfaceDownRequested) Args

func (e *EventInterfaceDownRequested) Args() []any

func (*EventInterfaceDownRequested) Format

func (*EventInterfaceDownRequested) IsErrorf

func (e *EventInterfaceDownRequested) IsErrorf() bool

func (*EventInterfaceDownRequested) Nice

func (*EventInterfaceDownRequested) Slog

type EventInterfaceStateChanged

type EventInterfaceStateChanged struct {
	Old  fmt.Stringer
	Want fmt.Stringer
	Now  fmt.Stringer
}

EventInterfaceStateChanged is an verbosef event recognized by the format string "Interface state was %s, requested %s, now %s".

func (*EventInterfaceStateChanged) Args

func (e *EventInterfaceStateChanged) Args() []any

func (*EventInterfaceStateChanged) Format

func (*EventInterfaceStateChanged) IsErrorf

func (e *EventInterfaceStateChanged) IsErrorf() bool

func (*EventInterfaceStateChanged) Nice

func (*EventInterfaceStateChanged) Slog

type EventInterfaceUpRequested

type EventInterfaceUpRequested struct{}

EventInterfaceUpRequested is an verbosef event recognized by the format string "Interface up requested".

func (*EventInterfaceUpRequested) Args

func (e *EventInterfaceUpRequested) Args() []any

func (*EventInterfaceUpRequested) Format

func (*EventInterfaceUpRequested) IsErrorf

func (e *EventInterfaceUpRequested) IsErrorf() bool

func (*EventInterfaceUpRequested) Nice

func (*EventInterfaceUpRequested) Slog

type EventInvalidMAC1

type EventInvalidMAC1 struct{}

EventInvalidMAC1 is an verbosef event recognized by the format string "Received packet with invalid mac1".

func (*EventInvalidMAC1) Args

func (e *EventInvalidMAC1) Args() []any

func (*EventInvalidMAC1) Format

func (*EventInvalidMAC1) Format() string

func (*EventInvalidMAC1) IsErrorf

func (e *EventInvalidMAC1) IsErrorf() bool

func (*EventInvalidMAC1) Nice

func (*EventInvalidMAC1) Nice() string

func (*EventInvalidMAC1) Slog

func (e *EventInvalidMAC1) Slog(l *slog.Logger)

type EventInvalidOperation

type EventInvalidOperation struct {
	Op string
}

EventInvalidOperation is an errorf event recognized by the format string "invalid UAPI operation: %v".

func (*EventInvalidOperation) Args

func (e *EventInvalidOperation) Args() []any

func (*EventInvalidOperation) Format

func (*EventInvalidOperation) Format() string

func (*EventInvalidOperation) IsErrorf

func (e *EventInvalidOperation) IsErrorf() bool

func (*EventInvalidOperation) Nice

func (*EventInvalidOperation) Nice() string

func (*EventInvalidOperation) Slog

func (e *EventInvalidOperation) Slog(l *slog.Logger)

type EventInvalidPacketInHandshakeQueue

type EventInvalidPacketInHandshakeQueue struct{}

EventInvalidPacketInHandshakeQueue is an errorf event recognized by the format string "Invalid packet ended up in the handshake queue".

func (*EventInvalidPacketInHandshakeQueue) Args

func (*EventInvalidPacketInHandshakeQueue) Format

func (*EventInvalidPacketInHandshakeQueue) IsErrorf

func (*EventInvalidPacketInHandshakeQueue) Nice

func (*EventInvalidPacketInHandshakeQueue) Slog

type EventLoadMTUFailed

type EventLoadMTUFailed struct {
	Err error
}

EventLoadMTUFailed is an errorf event recognized by the format string "Failed to load updated MTU of device: %v".

func (*EventLoadMTUFailed) Args

func (e *EventLoadMTUFailed) Args() []any

func (*EventLoadMTUFailed) Format

func (*EventLoadMTUFailed) Format() string

func (*EventLoadMTUFailed) IsErrorf

func (e *EventLoadMTUFailed) IsErrorf() bool

func (*EventLoadMTUFailed) Nice

func (*EventLoadMTUFailed) Nice() string

func (*EventLoadMTUFailed) Slog

func (e *EventLoadMTUFailed) Slog(l *slog.Logger)

type EventMTUTooLarge

type EventMTUTooLarge struct {
	MTU int
	Cap int
}

EventMTUTooLarge is an verbosef event recognized by the format string "MTU updated: %v (too large, capped at %v)".

func (*EventMTUTooLarge) Args

func (e *EventMTUTooLarge) Args() []any

func (*EventMTUTooLarge) Format

func (*EventMTUTooLarge) Format() string

func (*EventMTUTooLarge) IsErrorf

func (e *EventMTUTooLarge) IsErrorf() bool

func (*EventMTUTooLarge) Nice

func (*EventMTUTooLarge) Nice() string

func (*EventMTUTooLarge) Slog

func (e *EventMTUTooLarge) Slog(l *slog.Logger)

type EventMTUUpdated

type EventMTUUpdated struct {
	MTU int
}

EventMTUUpdated is an verbosef event recognized by the format string "MTU updated: %v".

func (*EventMTUUpdated) Args

func (e *EventMTUUpdated) Args() []any

func (*EventMTUUpdated) Format

func (*EventMTUUpdated) Format() string

func (*EventMTUUpdated) IsErrorf

func (e *EventMTUUpdated) IsErrorf() bool

func (*EventMTUUpdated) Nice

func (*EventMTUUpdated) Nice() string

func (*EventMTUUpdated) Slog

func (e *EventMTUUpdated) Slog(l *slog.Logger)

type EventMessageUnknownType

type EventMessageUnknownType struct{}

EventMessageUnknownType is an verbosef event recognized by the format string "Received message with unknown type".

func (*EventMessageUnknownType) Args

func (e *EventMessageUnknownType) Args() []any

func (*EventMessageUnknownType) Format

func (*EventMessageUnknownType) Format() string

func (*EventMessageUnknownType) IsErrorf

func (e *EventMessageUnknownType) IsErrorf() bool

func (*EventMessageUnknownType) Nice

func (*EventMessageUnknownType) Slog

func (e *EventMessageUnknownType) Slog(l *slog.Logger)

type EventNegativeMTU

type EventNegativeMTU struct {
	MTU int
}

EventNegativeMTU is an errorf event recognized by the format string "MTU not updated to negative value: %v".

func (*EventNegativeMTU) Args

func (e *EventNegativeMTU) Args() []any

func (*EventNegativeMTU) Format

func (*EventNegativeMTU) Format() string

func (*EventNegativeMTU) IsErrorf

func (e *EventNegativeMTU) IsErrorf() bool

func (*EventNegativeMTU) Nice

func (*EventNegativeMTU) Nice() string

func (*EventNegativeMTU) Slog

func (e *EventNegativeMTU) Slog(l *slog.Logger)

type EventPacketDataSendFailed

type EventPacketDataSendFailed struct {
	Peer *device.Peer
	Err  error
}

EventPacketDataSendFailed is an errorf event recognized by the format string "%v - Failed to send data packets: %v".

func (*EventPacketDataSendFailed) Args

func (e *EventPacketDataSendFailed) Args() []any

func (*EventPacketDataSendFailed) Format

func (*EventPacketDataSendFailed) IsErrorf

func (e *EventPacketDataSendFailed) IsErrorf() bool

func (*EventPacketDataSendFailed) Nice

func (*EventPacketDataSendFailed) Slog

type EventPacketIPVersionInvalid

type EventPacketIPVersionInvalid struct {
	Peer *device.Peer
}

EventPacketIPVersionInvalid is an verbosef event recognized by the format string "Packet with invalid IP version from %v".

func (*EventPacketIPVersionInvalid) Args

func (e *EventPacketIPVersionInvalid) Args() []any

func (*EventPacketIPVersionInvalid) Format

func (*EventPacketIPVersionInvalid) IsErrorf

func (e *EventPacketIPVersionInvalid) IsErrorf() bool

func (*EventPacketIPVersionInvalid) Nice

func (*EventPacketIPVersionInvalid) Slog

type EventPacketIPVersionUnknown

type EventPacketIPVersionUnknown struct{}

EventPacketIPVersionUnknown is an verbosef event recognized by the format string "Received packet with unknown IP version".

func (*EventPacketIPVersionUnknown) Args

func (e *EventPacketIPVersionUnknown) Args() []any

func (*EventPacketIPVersionUnknown) Format

func (*EventPacketIPVersionUnknown) IsErrorf

func (e *EventPacketIPVersionUnknown) IsErrorf() bool

func (*EventPacketIPVersionUnknown) Nice

func (*EventPacketIPVersionUnknown) Slog

type EventPacketReceiveFailed

type EventPacketReceiveFailed struct {
	RecvName string
	Err      error
}

EventPacketReceiveFailed is an verbosef event recognized by the format string "Failed to receive %s packet: %v".

func (*EventPacketReceiveFailed) Args

func (e *EventPacketReceiveFailed) Args() []any

func (*EventPacketReceiveFailed) Format

func (*EventPacketReceiveFailed) Format() string

func (*EventPacketReceiveFailed) IsErrorf

func (e *EventPacketReceiveFailed) IsErrorf() bool

func (*EventPacketReceiveFailed) Nice

func (*EventPacketReceiveFailed) Slog

func (e *EventPacketReceiveFailed) Slog(l *slog.Logger)

type EventPeerStarting

type EventPeerStarting struct {
	Peer *device.Peer
}

EventPeerStarting is an verbosef event recognized by the format string "%v - Starting".

func (*EventPeerStarting) Args

func (e *EventPeerStarting) Args() []any

func (*EventPeerStarting) Format

func (*EventPeerStarting) Format() string

func (*EventPeerStarting) IsErrorf

func (e *EventPeerStarting) IsErrorf() bool

func (*EventPeerStarting) Nice

func (*EventPeerStarting) Nice() string

func (*EventPeerStarting) Slog

func (e *EventPeerStarting) Slog(l *slog.Logger)

type EventPeerStopping

type EventPeerStopping struct {
	Peer *device.Peer
}

EventPeerStopping is an verbosef event recognized by the format string "%v - Stopping".

func (*EventPeerStopping) Args

func (e *EventPeerStopping) Args() []any

func (*EventPeerStopping) Format

func (*EventPeerStopping) Format() string

func (*EventPeerStopping) IsErrorf

func (e *EventPeerStopping) IsErrorf() bool

func (*EventPeerStopping) Nice

func (*EventPeerStopping) Nice() string

func (*EventPeerStopping) Slog

func (e *EventPeerStopping) Slog(l *slog.Logger)

type EventReceivedHandshakeInitiation

type EventReceivedHandshakeInitiation struct {
	Peer *device.Peer
}

EventReceivedHandshakeInitiation is an verbosef event recognized by the format string "%v - Received handshake initiation".

func (*EventReceivedHandshakeInitiation) Args

func (*EventReceivedHandshakeInitiation) Format

func (*EventReceivedHandshakeInitiation) IsErrorf

func (e *EventReceivedHandshakeInitiation) IsErrorf() bool

func (*EventReceivedHandshakeInitiation) Nice

func (*EventReceivedHandshakeInitiation) Slog

type EventReceivedHandshakeResponse

type EventReceivedHandshakeResponse struct {
	Peer *device.Peer
}

EventReceivedHandshakeResponse is an verbosef event recognized by the format string "%v - Received handshake response".

func (*EventReceivedHandshakeResponse) Args

func (e *EventReceivedHandshakeResponse) Args() []any

func (*EventReceivedHandshakeResponse) Format

func (*EventReceivedHandshakeResponse) IsErrorf

func (e *EventReceivedHandshakeResponse) IsErrorf() bool

func (*EventReceivedHandshakeResponse) Nice

func (*EventReceivedHandshakeResponse) Slog

type EventReceivedInvalidInitiation

type EventReceivedInvalidInitiation struct {
	Destination string
}

EventReceivedInvalidInitiation is an verbosef event recognized by the format string "Received invalid initiation message from %s".

func (*EventReceivedInvalidInitiation) Args

func (e *EventReceivedInvalidInitiation) Args() []any

func (*EventReceivedInvalidInitiation) Format

func (*EventReceivedInvalidInitiation) IsErrorf

func (e *EventReceivedInvalidInitiation) IsErrorf() bool

func (*EventReceivedInvalidInitiation) Nice

func (*EventReceivedInvalidInitiation) Slog

type EventReceivedInvalidResponse

type EventReceivedInvalidResponse struct {
	Destination string
}

EventReceivedInvalidResponse is an verbosef event recognized by the format string "Received invalid response message from %s".

func (*EventReceivedInvalidResponse) Args

func (e *EventReceivedInvalidResponse) Args() []any

func (*EventReceivedInvalidResponse) Format

func (*EventReceivedInvalidResponse) IsErrorf

func (e *EventReceivedInvalidResponse) IsErrorf() bool

func (*EventReceivedInvalidResponse) Nice

func (*EventReceivedInvalidResponse) Slog

type EventReceivingCookieResponse

type EventReceivingCookieResponse struct {
	Destination string
}

EventReceivingCookieResponse is an verbosef event recognized by the format string "Receiving cookie response from %s".

func (*EventReceivingCookieResponse) Args

func (e *EventReceivingCookieResponse) Args() []any

func (*EventReceivingCookieResponse) Format

func (*EventReceivingCookieResponse) IsErrorf

func (e *EventReceivingCookieResponse) IsErrorf() bool

func (*EventReceivingCookieResponse) Nice

func (*EventReceivingCookieResponse) Slog

type EventReceivingKeepalivePacket

type EventReceivingKeepalivePacket struct {
	Peer *device.Peer
}

EventReceivingKeepalivePacket is an verbosef event recognized by the format string "%v - Receiving keepalive packet".

func (*EventReceivingKeepalivePacket) Args

func (e *EventReceivingKeepalivePacket) Args() []any

func (*EventReceivingKeepalivePacket) Format

func (*EventReceivingKeepalivePacket) IsErrorf

func (e *EventReceivingKeepalivePacket) IsErrorf() bool

func (*EventReceivingKeepalivePacket) Nice

func (*EventReceivingKeepalivePacket) Slog

type EventRemovingAllKeys

type EventRemovingAllKeys struct {
	Peer    *device.Peer
	Timeout int
}

EventRemovingAllKeys is an verbosef event recognized by the format string "%s - Removing all keys, since we haven't received a new one in %d seconds".

func (*EventRemovingAllKeys) Args

func (e *EventRemovingAllKeys) Args() []any

func (*EventRemovingAllKeys) Format

func (*EventRemovingAllKeys) Format() string

func (*EventRemovingAllKeys) IsErrorf

func (e *EventRemovingAllKeys) IsErrorf() bool

func (*EventRemovingAllKeys) Nice

func (*EventRemovingAllKeys) Nice() string

func (*EventRemovingAllKeys) Slog

func (e *EventRemovingAllKeys) Slog(l *slog.Logger)

type EventResponseMessageDecodeFailed

type EventResponseMessageDecodeFailed struct{}

EventResponseMessageDecodeFailed is an errorf event recognized by the format string "Failed to decode response message".

func (*EventResponseMessageDecodeFailed) Args

func (*EventResponseMessageDecodeFailed) Format

func (*EventResponseMessageDecodeFailed) IsErrorf

func (e *EventResponseMessageDecodeFailed) IsErrorf() bool

func (*EventResponseMessageDecodeFailed) Nice

func (*EventResponseMessageDecodeFailed) Slog

type EventRetryingHandshake

type EventRetryingHandshake struct {
	Peer    *device.Peer
	Timeout int
	Try     uint32
}

EventRetryingHandshake is an verbosef event recognized by the format string "%s - Handshake did not complete after %d seconds, retrying (try %d)".

func (*EventRetryingHandshake) Args

func (e *EventRetryingHandshake) Args() []any

func (*EventRetryingHandshake) Format

func (*EventRetryingHandshake) Format() string

func (*EventRetryingHandshake) IsErrorf

func (e *EventRetryingHandshake) IsErrorf() bool

func (*EventRetryingHandshake) Nice

func (*EventRetryingHandshake) Slog

func (e *EventRetryingHandshake) Slog(l *slog.Logger)

type EventRetryingHandshakeNoResponse

type EventRetryingHandshakeNoResponse struct {
	Peer    *device.Peer
	Timeout int
}

EventRetryingHandshakeNoResponse is an verbosef event recognized by the format string "%s - Retrying handshake because we stopped hearing back after %d seconds".

func (*EventRetryingHandshakeNoResponse) Args

func (*EventRetryingHandshakeNoResponse) Format

func (*EventRetryingHandshakeNoResponse) IsErrorf

func (e *EventRetryingHandshakeNoResponse) IsErrorf() bool

func (*EventRetryingHandshakeNoResponse) Nice

func (*EventRetryingHandshakeNoResponse) Slog

type EventSendCookieDenied

type EventSendCookieDenied struct {
	Destination string
}

EventSendCookieDenied is an verbosef event recognized by the format string "Sending cookie response for denied handshake message for %v".

func (*EventSendCookieDenied) Args

func (e *EventSendCookieDenied) Args() []any

func (*EventSendCookieDenied) Format

func (*EventSendCookieDenied) Format() string

func (*EventSendCookieDenied) IsErrorf

func (e *EventSendCookieDenied) IsErrorf() bool

func (*EventSendCookieDenied) Nice

func (*EventSendCookieDenied) Nice() string

func (*EventSendCookieDenied) Slog

func (e *EventSendCookieDenied) Slog(l *slog.Logger)

type EventSendHandshakeInitiationFailed

type EventSendHandshakeInitiationFailed struct {
	Peer *device.Peer
	Err  error
}

EventSendHandshakeInitiationFailed is an errorf event recognized by the format string "%v - Failed to send handshake initiation: %v".

func (*EventSendHandshakeInitiationFailed) Args

func (*EventSendHandshakeInitiationFailed) Format

func (*EventSendHandshakeInitiationFailed) IsErrorf

func (*EventSendHandshakeInitiationFailed) Nice

func (*EventSendHandshakeInitiationFailed) Slog

type EventSendingHandshakeInitiation

type EventSendingHandshakeInitiation struct {
	Peer *device.Peer
}

EventSendingHandshakeInitiation is an verbosef event recognized by the format string "%v - Sending handshake initiation".

func (*EventSendingHandshakeInitiation) Args

func (*EventSendingHandshakeInitiation) Format

func (*EventSendingHandshakeInitiation) IsErrorf

func (e *EventSendingHandshakeInitiation) IsErrorf() bool

func (*EventSendingHandshakeInitiation) Nice

func (*EventSendingHandshakeInitiation) Slog

type EventSendingHandshakeResponse

type EventSendingHandshakeResponse struct {
	Peer *device.Peer
}

EventSendingHandshakeResponse is an verbosef event recognized by the format string "%v - Sending handshake response".

func (*EventSendingHandshakeResponse) Args

func (e *EventSendingHandshakeResponse) Args() []any

func (*EventSendingHandshakeResponse) Format

func (*EventSendingHandshakeResponse) IsErrorf

func (e *EventSendingHandshakeResponse) IsErrorf() bool

func (*EventSendingHandshakeResponse) Nice

func (*EventSendingHandshakeResponse) Slog

type EventSendingKeepalivePacket

type EventSendingKeepalivePacket struct {
	Peer *device.Peer
}

EventSendingKeepalivePacket is an verbosef event recognized by the format string "%v - Sending keepalive packet".

func (*EventSendingKeepalivePacket) Args

func (e *EventSendingKeepalivePacket) Args() []any

func (*EventSendingKeepalivePacket) Format

func (*EventSendingKeepalivePacket) IsErrorf

func (e *EventSendingKeepalivePacket) IsErrorf() bool

func (*EventSendingKeepalivePacket) Nice

func (*EventSendingKeepalivePacket) Slog

type EventSequentialReaderStopped

type EventSequentialReaderStopped struct {
	Peer *device.Peer
}

EventSequentialReaderStopped is an verbosef event recognized by the format string "%v - Routine: sequential sender - stopped".

func (*EventSequentialReaderStopped) Args

func (e *EventSequentialReaderStopped) Args() []any

func (*EventSequentialReaderStopped) Format

func (*EventSequentialReaderStopped) IsErrorf

func (e *EventSequentialReaderStopped) IsErrorf() bool

func (*EventSequentialReaderStopped) Nice

func (*EventSequentialReaderStopped) Slog

type EventSequentialReceiverStarted

type EventSequentialReceiverStarted struct {
	Peer *device.Peer
}

EventSequentialReceiverStarted is an verbosef event recognized by the format string "%v - Routine: sequential receiver - started".

func (*EventSequentialReceiverStarted) Args

func (e *EventSequentialReceiverStarted) Args() []any

func (*EventSequentialReceiverStarted) Format

func (*EventSequentialReceiverStarted) IsErrorf

func (e *EventSequentialReceiverStarted) IsErrorf() bool

func (*EventSequentialReceiverStarted) Nice

func (*EventSequentialReceiverStarted) Slog

type EventSequentialReceiverStopped

type EventSequentialReceiverStopped struct {
	Peer *device.Peer
}

EventSequentialReceiverStopped is an verbosef event recognized by the format string "%v - Routine: sequential receiver - stopped".

func (*EventSequentialReceiverStopped) Args

func (e *EventSequentialReceiverStopped) Args() []any

func (*EventSequentialReceiverStopped) Format

func (*EventSequentialReceiverStopped) IsErrorf

func (e *EventSequentialReceiverStopped) IsErrorf() bool

func (*EventSequentialReceiverStopped) Nice

func (*EventSequentialReceiverStopped) Slog

type EventSequentialSenderStarted

type EventSequentialSenderStarted struct {
	Peer *device.Peer
}

EventSequentialSenderStarted is an verbosef event recognized by the format string "%v - Routine: sequential sender - started".

func (*EventSequentialSenderStarted) Args

func (e *EventSequentialSenderStarted) Args() []any

func (*EventSequentialSenderStarted) Format

func (*EventSequentialSenderStarted) IsErrorf

func (e *EventSequentialSenderStarted) IsErrorf() bool

func (*EventSequentialSenderStarted) Nice

func (*EventSequentialSenderStarted) Slog

type EventStartedDecryptionWorker

type EventStartedDecryptionWorker struct {
	ID int
}

EventStartedDecryptionWorker is an verbosef event recognized by the format string "Routine: decryption worker %d - started".

func (*EventStartedDecryptionWorker) Args

func (e *EventStartedDecryptionWorker) Args() []any

func (*EventStartedDecryptionWorker) Format

func (*EventStartedDecryptionWorker) IsErrorf

func (e *EventStartedDecryptionWorker) IsErrorf() bool

func (*EventStartedDecryptionWorker) Nice

func (*EventStartedDecryptionWorker) Slog

type EventStartedEncryptionWorker

type EventStartedEncryptionWorker struct {
	ID int
}

EventStartedEncryptionWorker is an verbosef event recognized by the format string "Routine: encryption worker %d - started".

func (*EventStartedEncryptionWorker) Args

func (e *EventStartedEncryptionWorker) Args() []any

func (*EventStartedEncryptionWorker) Format

func (*EventStartedEncryptionWorker) IsErrorf

func (e *EventStartedEncryptionWorker) IsErrorf() bool

func (*EventStartedEncryptionWorker) Nice

func (*EventStartedEncryptionWorker) Slog

type EventStartedHandshakeWorker

type EventStartedHandshakeWorker struct {
	ID int
}

EventStartedHandshakeWorker is an verbosef event recognized by the format string "Routine: handshake worker %d - started".

func (*EventStartedHandshakeWorker) Args

func (e *EventStartedHandshakeWorker) Args() []any

func (*EventStartedHandshakeWorker) Format

func (*EventStartedHandshakeWorker) IsErrorf

func (e *EventStartedHandshakeWorker) IsErrorf() bool

func (*EventStartedHandshakeWorker) Nice

func (*EventStartedHandshakeWorker) Slog

type EventStartedReceivingIncoming

type EventStartedReceivingIncoming struct {
	RecvName string
}

EventStartedReceivingIncoming is an verbosef event recognized by the format string "Routine: receive incoming %s - stopped".

func (*EventStartedReceivingIncoming) Args

func (e *EventStartedReceivingIncoming) Args() []any

func (*EventStartedReceivingIncoming) Format

func (*EventStartedReceivingIncoming) IsErrorf

func (e *EventStartedReceivingIncoming) IsErrorf() bool

func (*EventStartedReceivingIncoming) Nice

func (*EventStartedReceivingIncoming) Slog

type EventStoppedEncryptionWorker

type EventStoppedEncryptionWorker struct {
	ID int
}

EventStoppedEncryptionWorker is an verbosef event recognized by the format string "Routine: encryption worker %d - stopped".

func (*EventStoppedEncryptionWorker) Args

func (e *EventStoppedEncryptionWorker) Args() []any

func (*EventStoppedEncryptionWorker) Format

func (*EventStoppedEncryptionWorker) IsErrorf

func (e *EventStoppedEncryptionWorker) IsErrorf() bool

func (*EventStoppedEncryptionWorker) Nice

func (*EventStoppedEncryptionWorker) Slog

type EventStoppedHandshakeWorker

type EventStoppedHandshakeWorker struct {
	ID int
}

EventStoppedHandshakeWorker is an verbosef event recognized by the format string "Routine: handshake worker %d - stopped".

func (*EventStoppedHandshakeWorker) Args

func (e *EventStoppedHandshakeWorker) Args() []any

func (*EventStoppedHandshakeWorker) Format

func (*EventStoppedHandshakeWorker) IsErrorf

func (e *EventStoppedHandshakeWorker) IsErrorf() bool

func (*EventStoppedHandshakeWorker) Nice

func (*EventStoppedHandshakeWorker) Slog

type EventStoppedReceivingIncoming

type EventStoppedReceivingIncoming struct {
	RecvName string
}

EventStoppedReceivingIncoming is an verbosef event recognized by the format string "Routine: receive incoming %s - started".

func (*EventStoppedReceivingIncoming) Args

func (e *EventStoppedReceivingIncoming) Args() []any

func (*EventStoppedReceivingIncoming) Format

func (*EventStoppedReceivingIncoming) IsErrorf

func (e *EventStoppedReceivingIncoming) IsErrorf() bool

func (*EventStoppedReceivingIncoming) Nice

func (*EventStoppedReceivingIncoming) Slog

type EventTUNReaderStarted

type EventTUNReaderStarted struct{}

EventTUNReaderStarted is an verbosef event recognized by the format string "Routine: TUN reader - started".

func (*EventTUNReaderStarted) Args

func (e *EventTUNReaderStarted) Args() []any

func (*EventTUNReaderStarted) Format

func (*EventTUNReaderStarted) Format() string

func (*EventTUNReaderStarted) IsErrorf

func (e *EventTUNReaderStarted) IsErrorf() bool

func (*EventTUNReaderStarted) Nice

func (*EventTUNReaderStarted) Nice() string

func (*EventTUNReaderStarted) Slog

func (e *EventTUNReaderStarted) Slog(l *slog.Logger)

type EventTUNReaderStopped

type EventTUNReaderStopped struct{}

EventTUNReaderStopped is an verbosef event recognized by the format string "Routine: TUN reader - stopped".

func (*EventTUNReaderStopped) Args

func (e *EventTUNReaderStopped) Args() []any

func (*EventTUNReaderStopped) Format

func (*EventTUNReaderStopped) Format() string

func (*EventTUNReaderStopped) IsErrorf

func (e *EventTUNReaderStopped) IsErrorf() bool

func (*EventTUNReaderStopped) Nice

func (*EventTUNReaderStopped) Nice() string

func (*EventTUNReaderStopped) Slog

func (e *EventTUNReaderStopped) Slog(l *slog.Logger)

type EventTUNWriteFailed

type EventTUNWriteFailed struct {
	Err error
}

EventTUNWriteFailed is an errorf event recognized by the format string "Failed to write packets to TUN device: %v".

func (*EventTUNWriteFailed) Args

func (e *EventTUNWriteFailed) Args() []any

func (*EventTUNWriteFailed) Format

func (*EventTUNWriteFailed) Format() string

func (*EventTUNWriteFailed) IsErrorf

func (e *EventTUNWriteFailed) IsErrorf() bool

func (*EventTUNWriteFailed) Nice

func (*EventTUNWriteFailed) Nice() string

func (*EventTUNWriteFailed) Slog

func (e *EventTUNWriteFailed) Slog(l *slog.Logger)

type EventTunPacketReadFailed

type EventTunPacketReadFailed struct {
	Err error
}

EventTunPacketReadFailed is an errorf event recognized by the format string "Failed to read packet from TUN device: %v".

func (*EventTunPacketReadFailed) Args

func (e *EventTunPacketReadFailed) Args() []any

func (*EventTunPacketReadFailed) Format

func (*EventTunPacketReadFailed) Format() string

func (*EventTunPacketReadFailed) IsErrorf

func (e *EventTunPacketReadFailed) IsErrorf() bool

func (*EventTunPacketReadFailed) Nice

func (*EventTunPacketReadFailed) Slog

func (e *EventTunPacketReadFailed) Slog(l *slog.Logger)

type EventUAPIAddingAllowedIP

type EventUAPIAddingAllowedIP struct {
	Peer *device.Peer
}

EventUAPIAddingAllowedIP is an verbosef event recognized by the format string "%v - UAPI: Adding allowedip".

func (*EventUAPIAddingAllowedIP) Args

func (e *EventUAPIAddingAllowedIP) Args() []any

func (*EventUAPIAddingAllowedIP) Format

func (*EventUAPIAddingAllowedIP) Format() string

func (*EventUAPIAddingAllowedIP) IsErrorf

func (e *EventUAPIAddingAllowedIP) IsErrorf() bool

func (*EventUAPIAddingAllowedIP) Nice

func (*EventUAPIAddingAllowedIP) Slog

func (e *EventUAPIAddingAllowedIP) Slog(l *slog.Logger)

type EventUAPICreated

type EventUAPICreated struct {
	Peer *device.Peer
}

EventUAPICreated is an verbosef event recognized by the format string "%v - UAPI: Created".

func (*EventUAPICreated) Args

func (e *EventUAPICreated) Args() []any

func (*EventUAPICreated) Format

func (*EventUAPICreated) Format() string

func (*EventUAPICreated) IsErrorf

func (e *EventUAPICreated) IsErrorf() bool

func (*EventUAPICreated) Nice

func (*EventUAPICreated) Nice() string

func (*EventUAPICreated) Slog

func (e *EventUAPICreated) Slog(l *slog.Logger)

type EventUAPIRemovingAllAllowedIPs

type EventUAPIRemovingAllAllowedIPs struct {
	Peer *device.Peer
}

EventUAPIRemovingAllAllowedIPs is an verbosef event recognized by the format string "%v - UAPI: Removing all allowedips".

func (*EventUAPIRemovingAllAllowedIPs) Args

func (e *EventUAPIRemovingAllAllowedIPs) Args() []any

func (*EventUAPIRemovingAllAllowedIPs) Format

func (*EventUAPIRemovingAllAllowedIPs) IsErrorf

func (e *EventUAPIRemovingAllAllowedIPs) IsErrorf() bool

func (*EventUAPIRemovingAllAllowedIPs) Nice

func (*EventUAPIRemovingAllAllowedIPs) Slog

type EventUAPIRemovingAllPeers

type EventUAPIRemovingAllPeers struct{}

EventUAPIRemovingAllPeers is an verbosef event recognized by the format string "UAPI: Removing all peers".

func (*EventUAPIRemovingAllPeers) Args

func (e *EventUAPIRemovingAllPeers) Args() []any

func (*EventUAPIRemovingAllPeers) Format

func (*EventUAPIRemovingAllPeers) IsErrorf

func (e *EventUAPIRemovingAllPeers) IsErrorf() bool

func (*EventUAPIRemovingAllPeers) Nice

func (*EventUAPIRemovingAllPeers) Slog

type EventUAPIRemovingPeer

type EventUAPIRemovingPeer struct {
	Peer *device.Peer
}

EventUAPIRemovingPeer is an verbosef event recognized by the format string "%v - UAPI: Removing".

func (*EventUAPIRemovingPeer) Args

func (e *EventUAPIRemovingPeer) Args() []any

func (*EventUAPIRemovingPeer) Format

func (*EventUAPIRemovingPeer) Format() string

func (*EventUAPIRemovingPeer) IsErrorf

func (e *EventUAPIRemovingPeer) IsErrorf() bool

func (*EventUAPIRemovingPeer) Nice

func (*EventUAPIRemovingPeer) Nice() string

func (*EventUAPIRemovingPeer) Slog

func (e *EventUAPIRemovingPeer) Slog(l *slog.Logger)

type EventUAPIUpdatingEndpoint

type EventUAPIUpdatingEndpoint struct {
	Peer *device.Peer
}

EventUAPIUpdatingEndpoint is an verbosef event recognized by the format string "%v - UAPI: Updating endpoint".

func (*EventUAPIUpdatingEndpoint) Args

func (e *EventUAPIUpdatingEndpoint) Args() []any

func (*EventUAPIUpdatingEndpoint) Format

func (*EventUAPIUpdatingEndpoint) IsErrorf

func (e *EventUAPIUpdatingEndpoint) IsErrorf() bool

func (*EventUAPIUpdatingEndpoint) Nice

func (*EventUAPIUpdatingEndpoint) Slog

type EventUAPIUpdatingFWMark

type EventUAPIUpdatingFWMark struct{}

EventUAPIUpdatingFWMark is an verbosef event recognized by the format string "UAPI: Updating fwmark".

func (*EventUAPIUpdatingFWMark) Args

func (e *EventUAPIUpdatingFWMark) Args() []any

func (*EventUAPIUpdatingFWMark) Format

func (*EventUAPIUpdatingFWMark) Format() string

func (*EventUAPIUpdatingFWMark) IsErrorf

func (e *EventUAPIUpdatingFWMark) IsErrorf() bool

func (*EventUAPIUpdatingFWMark) Nice

func (*EventUAPIUpdatingFWMark) Slog

func (e *EventUAPIUpdatingFWMark) Slog(l *slog.Logger)

type EventUAPIUpdatingListenPort

type EventUAPIUpdatingListenPort struct{}

EventUAPIUpdatingListenPort is an verbosef event recognized by the format string "UAPI: Updating listen port".

func (*EventUAPIUpdatingListenPort) Args

func (e *EventUAPIUpdatingListenPort) Args() []any

func (*EventUAPIUpdatingListenPort) Format

func (*EventUAPIUpdatingListenPort) IsErrorf

func (e *EventUAPIUpdatingListenPort) IsErrorf() bool

func (*EventUAPIUpdatingListenPort) Nice

func (*EventUAPIUpdatingListenPort) Slog

type EventUAPIUpdatingPersistentKeepalive

type EventUAPIUpdatingPersistentKeepalive struct {
	Peer *device.Peer
}

EventUAPIUpdatingPersistentKeepalive is an verbosef event recognized by the format string "%v - UAPI: Updating persistent keepalive interval".

func (*EventUAPIUpdatingPersistentKeepalive) Args

func (*EventUAPIUpdatingPersistentKeepalive) Format

func (*EventUAPIUpdatingPersistentKeepalive) IsErrorf

func (*EventUAPIUpdatingPersistentKeepalive) Nice

func (*EventUAPIUpdatingPersistentKeepalive) Slog

type EventUAPIUpdatingPresharedKey

type EventUAPIUpdatingPresharedKey struct {
	Peer *device.Peer
}

EventUAPIUpdatingPresharedKey is an verbosef event recognized by the format string "%v - UAPI: Updating preshared key".

func (*EventUAPIUpdatingPresharedKey) Args

func (e *EventUAPIUpdatingPresharedKey) Args() []any

func (*EventUAPIUpdatingPresharedKey) Format

func (*EventUAPIUpdatingPresharedKey) IsErrorf

func (e *EventUAPIUpdatingPresharedKey) IsErrorf() bool

func (*EventUAPIUpdatingPresharedKey) Nice

func (*EventUAPIUpdatingPresharedKey) Slog

type EventUAPIUpdatingPrivateKey

type EventUAPIUpdatingPrivateKey struct{}

EventUAPIUpdatingPrivateKey is an verbosef event recognized by the format string "UAPI: Updating private key".

func (*EventUAPIUpdatingPrivateKey) Args

func (e *EventUAPIUpdatingPrivateKey) Args() []any

func (*EventUAPIUpdatingPrivateKey) Format

func (*EventUAPIUpdatingPrivateKey) IsErrorf

func (e *EventUAPIUpdatingPrivateKey) IsErrorf() bool

func (*EventUAPIUpdatingPrivateKey) Nice

func (*EventUAPIUpdatingPrivateKey) Slog

type EventUDPGSODisabled

type EventUDPGSODisabled struct {
	OnLAddr string
}

EventUDPGSODisabled is an verbosef event recognized by the format string "disabled UDP GSO on %s, NIC(s) may not support checksum offload".

func (*EventUDPGSODisabled) Args

func (e *EventUDPGSODisabled) Args() []any

func (*EventUDPGSODisabled) Format

func (*EventUDPGSODisabled) Format() string

func (*EventUDPGSODisabled) IsErrorf

func (e *EventUDPGSODisabled) IsErrorf() bool

func (*EventUDPGSODisabled) Nice

func (*EventUDPGSODisabled) Nice() string

func (*EventUDPGSODisabled) Slog

func (e *EventUDPGSODisabled) Slog(l *slog.Logger)

type EventUpdateBind

type EventUpdateBind struct {
	Err error
}

EventUpdateBind is an errorf event recognized by the format string "Unable to update bind: %v".

func (*EventUpdateBind) Args

func (e *EventUpdateBind) Args() []any

func (*EventUpdateBind) Format

func (*EventUpdateBind) Format() string

func (*EventUpdateBind) IsErrorf

func (e *EventUpdateBind) IsErrorf() bool

func (*EventUpdateBind) Nice

func (*EventUpdateBind) Nice() string

func (*EventUpdateBind) Slog

func (e *EventUpdateBind) Slog(l *slog.Logger)

type EventValue

type EventValue struct {
	Err error
}

EventValue is an errorf event recognized by the format string "%v".

func (*EventValue) Args

func (e *EventValue) Args() []any

func (*EventValue) Format

func (*EventValue) Format() string

func (*EventValue) IsErrorf

func (e *EventValue) IsErrorf() bool

func (*EventValue) Nice

func (*EventValue) Nice() string

func (*EventValue) Slog

func (e *EventValue) Slog(l *slog.Logger)

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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