internal

package
v0.0.1-0...-476ed70 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyCommand = "command"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bake

type Bake struct {
	Args      []string
	Directory string
}

func (Bake) Run

func (b Bake) Run(ctx context.Context, kevin *Kevin) (md map[string]MetaData, err error)

type Cluster

type Cluster interface {
	slog.LogValuer
	Context(context.Context) (string, error)
	Create(context.Context, *Kevin) error
	Delete(context.Context, *Kevin) error
	Init(context.Context, *Kevin) error
	Load(context.Context, *Kevin, Image) error
}

func NewCluster

func NewCluster(ctx context.Context, name string, config ClusterConfig) (Cluster, error)

type ClusterConfig

type ClusterConfig struct {
	// TODO Helmfile Helmfile (merge)
	Kind KindConfig
}

type Cmd

type Cmd struct {
	*exec.Cmd
}

func NewCmd

func NewCmd(
	ctx context.Context,
	name string,
	args ...string,
) *Cmd

func (*Cmd) LogWriter

func (cmd *Cmd) LogWriter(ctx context.Context) io.Writer

func (Cmd) Run

func (cmd Cmd) Run() error

type Config

type Config struct {
	Bake     Bake
	Clusters map[string]ClusterConfig
	Helmfile Helmfile
	// TODO Kind Kind (merge clusters’)
	Path string `yaml:"-"`
}

type Container

type Container struct {
	// Command      string `json:"Command,omitempty"`
	CreatedAt string `json:"CreatedAt,omitempty"`
	ID        string `json:"ID,omitempty"`
	// Image        string `json:"Image,omitempty"`
	// Labels       string `json:"Labels,omitempty"`
	// LocalVolumes string `json:"LocalVolumes,omitempty"`
	// Mounts       string `json:"Mounts,omitempty"`
	Names string `json:"Names,omitempty"`
	// Networks     string `json:"Networks,omitempty"`
	// Platform     any    `json:"Platform,omitempty"`
	// Ports        string `json:"Ports,omitempty"`
	// RunningFor   string `json:"RunningFor,omitempty"`
	// Size         string `json:"Size,omitempty"`
	State  string `json:"State,omitempty"`
	Status string `json:"Status,omitempty"`
}

type Error

type Error string
const (
	ErrUser Error = "user error"
)

func (Error) Error

func (err Error) Error() string

func (Error) ExitCode

func (err Error) ExitCode() int

type ExitCoder

type ExitCoder interface {
	ExitCode() int
}

type Helmfile

type Helmfile struct {
	Args []string
}

func (Helmfile) Cmd

func (h Helmfile) Cmd(
	ctx context.Context,
	args ...string,
) (*Cmd, error)

type Image

type Image struct {
	Repository string
	Tag        string
}

func (Image) LogValue

func (i Image) LogValue() slog.Value

type Kevin

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

func New

func New(context.Context) (k *Kevin, err error)

func (*Kevin) Close

func (k *Kevin) Close() error

func (*Kevin) FindFile

func (k *Kevin) FindFile(
	ctx context.Context,
	name string,
) (dir string, file *os.File, err error)

func (*Kevin) HelmfileApply

func (k *Kevin) HelmfileApply(ctx context.Context) error

func (*Kevin) LoadImages

func (k *Kevin) LoadImages(ctx context.Context) error

func (*Kevin) Main

func (k *Kevin) Main(ctx context.Context, args ...string) error

func (*Kevin) TempFile

func (k *Kevin) TempFile(ctx context.Context, name string) (string, error)

type Kind

type Kind struct {
	ClusterConfig
	Name string
}

func (*Kind) Context

func (k *Kind) Context(context.Context) (string, error)

func (*Kind) Create

func (k *Kind) Create(ctx context.Context, kevin *Kevin) error

func (*Kind) Delete

func (k *Kind) Delete(ctx context.Context, _ *Kevin) error

func (*Kind) Init

func (k *Kind) Init(context.Context, *Kevin) (err error)

func (*Kind) Load

func (k *Kind) Load(ctx context.Context, _ *Kevin, image Image) error

func (Kind) LogValue

func (k Kind) LogValue() slog.Value

type KindConfig

type KindConfig struct {
	Config *string
}

type KubeConfig

type KubeConfig struct {
	Clusters []struct {
		Cluster struct {
			Server string
		}
		Name string
	}
}

type Lazy

type Lazy[T any] struct {
	Init func(context.Context) (T, error)
	// contains filtered or unexported fields
}

func (*Lazy[T]) Get

func (l *Lazy[T]) Get(ctx context.Context) (t T, err error)

func (*Lazy[T]) GetIfSet

func (l *Lazy[T]) GetIfSet(ctx context.Context) (t T, ok bool)

type MetaData

type MetaData struct {
	ImageName string `json:"image.name,omitempty"`
	Digest    string `json:"containerimage.digest"`
}

type Values

type Values struct {
	Generated time.Time
	Images    map[string]Image
}

Jump to

Keyboard shortcuts

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