etcd

package
v0.5.4-rc6 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EtcdStore

type EtcdStore struct {
	EtcdStoreOptions
	Logger *zap.SugaredLogger
	Client *clientv3.Client
}

EtcdStore implements TokenStore and TenantStore.

func NewEtcdStore

func NewEtcdStore(ctx context.Context, conf *v1beta1.EtcdStorageSpec, opts ...EtcdStoreOption) *EtcdStore

func (*EtcdStore) CreateCluster

func (e *EtcdStore) CreateCluster(ctx context.Context, cluster *corev1.Cluster) error

func (*EtcdStore) CreateRole

func (e *EtcdStore) CreateRole(ctx context.Context, role *corev1.Role) error

func (*EtcdStore) CreateRoleBinding

func (e *EtcdStore) CreateRoleBinding(ctx context.Context, roleBinding *corev1.RoleBinding) error

func (*EtcdStore) CreateToken

func (e *EtcdStore) CreateToken(ctx context.Context, ttl time.Duration, opts ...storage.TokenCreateOption) (*corev1.BootstrapToken, error)

func (*EtcdStore) DeleteCluster

func (e *EtcdStore) DeleteCluster(ctx context.Context, ref *corev1.Reference) error

func (*EtcdStore) DeleteRole

func (e *EtcdStore) DeleteRole(ctx context.Context, ref *corev1.Reference) error

func (*EtcdStore) DeleteRoleBinding

func (e *EtcdStore) DeleteRoleBinding(ctx context.Context, ref *corev1.Reference) error

func (*EtcdStore) DeleteToken

func (e *EtcdStore) DeleteToken(ctx context.Context, ref *corev1.Reference) error

func (*EtcdStore) GetCluster

func (e *EtcdStore) GetCluster(ctx context.Context, ref *corev1.Reference) (*corev1.Cluster, error)

func (*EtcdStore) GetRole

func (e *EtcdStore) GetRole(ctx context.Context, ref *corev1.Reference) (*corev1.Role, error)

func (*EtcdStore) GetRoleBinding

func (e *EtcdStore) GetRoleBinding(ctx context.Context, ref *corev1.Reference) (*corev1.RoleBinding, error)

func (*EtcdStore) GetToken

func (e *EtcdStore) GetToken(ctx context.Context, ref *corev1.Reference) (*corev1.BootstrapToken, error)

func (*EtcdStore) KeyValueStore

func (e *EtcdStore) KeyValueStore(prefix string) (storage.KeyValueStore, error)

func (*EtcdStore) KeyringStore

func (e *EtcdStore) KeyringStore(prefix string, ref *corev1.Reference) (storage.KeyringStore, error)

func (*EtcdStore) ListClusters

func (e *EtcdStore) ListClusters(
	ctx context.Context,
	matchLabels *corev1.LabelSelector,
	matchOptions corev1.MatchOptions,
) (*corev1.ClusterList, error)

func (*EtcdStore) ListRoleBindings

func (e *EtcdStore) ListRoleBindings(ctx context.Context) (*corev1.RoleBindingList, error)

func (*EtcdStore) ListRoles

func (e *EtcdStore) ListRoles(ctx context.Context) (*corev1.RoleList, error)

func (*EtcdStore) ListTokens

func (e *EtcdStore) ListTokens(ctx context.Context) ([]*corev1.BootstrapToken, error)

func (*EtcdStore) UpdateCluster

func (e *EtcdStore) UpdateCluster(
	ctx context.Context,
	ref *corev1.Reference,
	mutator storage.MutatorFunc[*corev1.Cluster],
) (*corev1.Cluster, error)

func (*EtcdStore) UpdateToken

type EtcdStoreOption

type EtcdStoreOption func(*EtcdStoreOptions)

func WithCommandTimeout

func WithCommandTimeout(timeout time.Duration) EtcdStoreOption

func WithPrefix

func WithPrefix(prefix string) EtcdStoreOption

type EtcdStoreOptions

type EtcdStoreOptions struct {
	Prefix         string
	CommandTimeout time.Duration
}

Jump to

Keyboard shortcuts

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