package keymanager

import "github.com/docker/swarmkit/manager/keymanager"

Index

Constants

const (
	// DefaultKeyLen is the default length (in bytes) of the key allocated
	DefaultKeyLen = 16

	// DefaultKeyRotationInterval used by key manager
	DefaultKeyRotationInterval = 12 * time.Hour

	// SubsystemGossip handles gossip protocol between the agents
	SubsystemGossip = "networking:gossip"

	// SubsystemIPSec is overlay network data encryption subsystem
	SubsystemIPSec = "networking:ipsec"

	// DefaultSubsystem is gossip
	DefaultSubsystem = SubsystemGossip
)

Types

type Config

type Config struct {
	ClusterName      string
	Keylen           int
	RotationInterval time.Duration
	Subsystems       []string
}

Config for the keymanager that can be modified

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig provides the default config for keymanager

type KeyManager

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

KeyManager handles key allocation, rotation & distribution

func New

func New(store *store.MemoryStore, config *Config) *KeyManager

New creates an instance of keymanager with the given config

func (*KeyManager) Run

func (k *KeyManager) Run(ctx context.Context) error

Run starts the keymanager, it doesn't return

func (*KeyManager) Stop

func (k *KeyManager) Stop() error

Stop stops the running instance of key manager

Source Files

keymanager.go

Version
v1.12.0 (latest)
Published
Jul 26, 2016
Platform
linux/amd64
Imports
9 packages
Last checked
3 hours ago

Tools for package owners.