ipam

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package ipam provides a plugin for simple mesh IPAM. It also acts as a storage plugin and uses the leases tracked in the mesh database to pseudo-randomly assign IP addresses to nodes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.1.5

type Config struct {
	// StaticIPv4 is a map of node names to IPv4 addresses.
	StaticIPv4 map[string]any `mapstructure:"static-ipv4,omitempty" koanf:"static-ipv4,omitempty"`
}

Config contains static address assignments for nodes.

func (*Config) AsMapStructure added in v0.3.1

func (c *Config) AsMapStructure() map[string]any

func (*Config) BindFlags added in v0.3.1

func (c *Config) BindFlags(prefix string, fs *pflag.FlagSet)

BindFlags binds the plugin flags to the given flag set.

func (*Config) DefaultOptions added in v0.3.1

func (c *Config) DefaultOptions() *Config

DefaultOptions returns the default options for the plugin.

func (*Config) SetMapStructure added in v0.8.0

func (c *Config) SetMapStructure(in map[string]any)

type Plugin

type Plugin struct {
	v1.UnimplementedPluginServer
	v1.UnimplementedIPAMPluginServer
	v1.UnimplementedStorageQuerierPluginServer
	// contains filtered or unexported fields
}

Plugin is the ipam plugin.

func (*Plugin) Allocate

func (p *Plugin) Allocate(ctx context.Context, r *v1.AllocateIPRequest) (*v1.AllocatedIP, error)

func (*Plugin) Close

func (p *Plugin) Close(ctx context.Context, req *emptypb.Empty) (*emptypb.Empty, error)

func (*Plugin) Configure

func (p *Plugin) Configure(ctx context.Context, req *v1.PluginConfiguration) (*emptypb.Empty, error)

func (*Plugin) GetInfo

func (p *Plugin) GetInfo(context.Context, *emptypb.Empty) (*v1.PluginInfo, error)

func (*Plugin) InjectQuerier

func (*Plugin) Release

TODO: Release is not implemented server-side yet either.

Jump to

Keyboard shortcuts

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