cluster

package
v1.1.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateProxyConfig

func CreateProxyConfig(ctx context.Context, cn *capsule.Network, jm *proxy.JWTMethod) (*proxy.Config, error)

Types

type Capsule

type Capsule struct {
	CapsuleID         string
	Image             string
	ContainerSettings *capsule.ContainerSettings
	Ports             []uint32
	Replicas          uint32
	Volumes           map[string]string
	Network           *capsule.Network
	Namespace         string
	Metadata          map[string]string
	JWTMethod         *proxy.JWTMethod
	RegistryAuth      *RegistryAuth
}

type Gateway

type Gateway interface {
	UpsertCapsule(ctx context.Context, capsuleName string, c *Capsule) error
	DeleteCapsule(ctx context.Context, capsuleName string) error

	ListInstances(ctx context.Context, capsuleName string) (iterator.Iterator[*capsule.Instance], uint64, error)
	RestartInstance(ctx context.Context, capsuleName, instanceID string) error

	Logs(ctx context.Context, capsuleName, instanceID string, follow bool) (iterator.Iterator[*capsule.Log], error)

	ListCapsuleMetrics(ctx context.Context) (iterator.Iterator[*capsule.InstanceMetrics], error)

	CreateVolume(ctx context.Context, id string) error

	// ImageExistsNatively checks if the image exists natively in the cluster. The repo digest is returned if found.
	ImageExistsNatively(ctx context.Context, image string) (bool, string, error)
}

type RegistryAuth added in v1.1.0

type RegistryAuth struct {
	Host           string
	RegistrySecret *registry.Secret
}

Jump to

Keyboard shortcuts

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