wgipamd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package wgipamd implements package main logic for the wgipamd server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {

	// TestListener is an optional hook that replaces the wg-dynamic server
	// listener with the net.Listener created by this function. If nil, the
	// wg-dynamic default listener is used.
	TestListener func() (net.Listener, error)
	// contains filtered or unexported fields
}

A Server coordinates the goroutines that handle various pieces of the wgipamd server.

func NewServer

func NewServer(cfg config.Config, ll *log.Logger) *Server

NewServer creates a Server with the input configuration and logger. If ll is nil, logs are discarded.

func (*Server) Ready

func (s *Server) Ready() <-chan struct{}

Ready indicates that the server is ready to begin serving requests.

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Run runs the wgipamd server until the context is canceled.

Jump to

Keyboard shortcuts

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