clients

package
v3.8.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultConfigPathV1 = "/etc/calico/apiconfigv1.cfg"
	DefaultConfigPathV3 = "/etc/calico/apiconfigv3.cfg"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type V1ClientInterface

type V1ClientInterface interface {
	Apply(d *model.KVPair) (*model.KVPair, error)
	Update(d *model.KVPair) (*model.KVPair, error)
	Get(k model.Key) (*model.KVPair, error)
	List(l model.ListInterface) ([]*model.KVPair, error)
	IsKDD() bool
}

func LoadClients

func LoadClients(v3Config, v1Config string) (clientv3.Interface, V1ClientInterface, error)

LoadClients loads the v3 and v1 clients required for the migration. v3Config and v1Config are the full file paths to the v3 APIConfig and the v1 APIConfig respectively. If either are blank, then this loads config from the environments.

If using Kubernetes API as the datastore, only the v3Config, or v3 environments need to be specified. The v1 client uses identical configuration for this datastore type.

func LoadKDDClientV1FromAPIConfigV3

func LoadKDDClientV1FromAPIConfigV3(apiConfigv3 *apiconfig.CalicoAPIConfig) (V1ClientInterface, error)

LoadKDDClientV1FromAPIConfigV3 loads the KDD v1 client given the v3 API Config (since the v1 and v3 client use the same access information).

Directories

Path Synopsis
v1
k8s

Jump to

Keyboard shortcuts

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