Documentation
¶
Index ¶
- type Option
- func WithCookieKey(key *zkidentity.FixedSizeSymmetricKey, ...) Option
- func WithIgnoreKernelStats() Option
- func WithListenAddrs(addrs ...*net.UDPAddr) Option
- func WithListeners(listeners ...*net.UDPConn) Option
- func WithLogAndReplyErrors() Option
- func WithLogErrors() Option
- func WithLogger(l slog.Logger) Option
- func WithPerListenerReadRoutines(i int) Option
- func WithPrivateKey(pk *zkidentity.FixedSizeSntrupPrivateKey) Option
- func WithPrometheusListenAddr(addr string) Option
- func WithReportStatsInterval(interval time.Duration) Option
- type Server
- type UDPProcStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(c *config)
Option is a functional server config option.
func WithCookieKey ¶
func WithCookieKey(key *zkidentity.FixedSizeSymmetricKey, decodeKeys []*zkidentity.FixedSizeSymmetricKey) Option
WithCookieKey sets the symmetric key to use for encrypting cookies.
func WithIgnoreKernelStats ¶
func WithIgnoreKernelStats() Option
WithIgnoreKernelStats disables tracking kernel stats. Only useful for testing.
func WithListenAddrs ¶
WithListenAddrs establishes the listening addresses of the server. Both listen addresses and raw listeners can be used to start the server.
func WithListeners ¶
WithListeners sets raw UDP listeners to be used with the server. Both listen addresses and raw listeners can be used to start the server.
func WithLogAndReplyErrors ¶
func WithLogAndReplyErrors() Option
WithLogAndReplyErrors enables logging and replying of action errors.
NOTE: this should only be used for temporary debugging or automated testing.
func WithLogErrors ¶
func WithLogErrors() Option
WithLogErrors enables logging of remotely generated errors.
NOTE: this should only be used for temporary debugging, because it may significantly increase log sizes.
func WithLogger ¶
WithLogger sets up the server to use the logger. Logger MUST NOT be nil.
func WithPerListenerReadRoutines ¶
WithPerListenerReadRoutines sets the number of reading goroutines to use for processing each listener's incoming packets.
func WithPrivateKey ¶
func WithPrivateKey(pk *zkidentity.FixedSizeSntrupPrivateKey) Option
WithPrivateKey sets the private key used for client-server encryption.
func WithPrometheusListenAddr ¶
WithPrometheusListenAddr sets the address to offer Prometheus metrics endpoint collection.
func WithReportStatsInterval ¶
WithReportStatsInterval sets the interval to log stats. If set to zero, reporting is disabled.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is an RTDT server.
type UDPProcStats ¶
UDPProcStats tracks kernel stats.