kubefactory

package
v1.8.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: MPL-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package kubefactory implement some minimal kubernetes runtime.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Etcd

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

Etcd represents a single running embedded etcd server.

func NewEmbeddedEtcd

func NewEmbeddedEtcd(ctx context.Context, path string, logger *zap.Logger) (*Etcd, error)

NewEmbeddedEtcd creates new embedded etcd instance.

func (*Etcd) Client

func (e *Etcd) Client() *clientv3.Client

Client creates a client for the server.

func (*Etcd) Stop

func (e *Etcd) Stop() error

Stop the etcd server.

type Kubernetes

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

Kubernetes is a mini fake kubelet.

func New

func New(ctx context.Context, dataDir string, logger *zap.Logger) (*Kubernetes, error)

New creates a kubernetes simulator.

func (*Kubernetes) DeleteEtcdState

func (k *Kubernetes) DeleteEtcdState(ctx context.Context, clusterID string) error

DeleteEtcdState removes all keys related to the cluster with the specified id.

func (*Kubernetes) RunAPIService

func (k *Kubernetes) RunAPIService(ctx context.Context, address, iface, machineID, clusterID string) error

RunAPIService spawns an api service on the specified address and using etcd state for the cluster ID.

Jump to

Keyboard shortcuts

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