ipam

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultSocketPath = "/run/unbounded-net/ipam.sock"
	ProtocolVersion   = 1
	MaxMessageSize    = 64 << 10
	RequestTimeout    = 5 * time.Second
)

Variables

This section is empty.

Functions

func ConfigFromCIDRs

func ConfigFromCIDRs(cidrs []string) (*ipamproto.Config, error)

func GetConfig

func GetConfig(ctx context.Context, path string) (*ipamproto.Config, error)

func ValidateSocketPath

func ValidateSocketPath(path string) error

Types

type ConfigProvider

type ConfigProvider func() (*ipamproto.Config, error)

type Plugin

type Plugin struct {
	DataDir string
	// contains filtered or unexported fields
}

Plugin uses the host-local store. DataDir is injectable for isolated tests; the installed binary always uses host-local's default directory.

func (Plugin) Add

func (p Plugin) Add(args *skel.CmdArgs) (returnErr error)

func (Plugin) Check

func (p Plugin) Check(args *skel.CmdArgs) (returnErr error)

func (Plugin) Del

func (p Plugin) Del(args *skel.CmdArgs) (returnErr error)

func (Plugin) Functions

func (p Plugin) Functions() skel.CNIFuncs

type Server

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

func Listen

func Listen(ctx context.Context, path string, provider ConfigProvider) (server *Server, returnErr error)

func (*Server) Close

func (s *Server) Close() error

func (*Server) Done

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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