operatorbase

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package operatorbase contains the base functionality for operators.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeforeConfig

func BeforeConfig(composeCommand []string) func(ctx context.Context, cmd *cli.Command) (context.Context, error)

BeforeConfig is a function that is called before the command is executed.

func PrepareConfig

func PrepareConfig(logger log.Logger, data map[string]any) (map[string]any, error)

PrepareConfig prepares the config

func ReadConfig

func ReadConfig(logger log.Logger, cmd *cli.Command) (map[string]any, error)

ReadConfig reads the config from stdin

func RunCmd

func RunCmd(ctx context.Context, args []string) error

RunCmd is a function that is called to run a command.

func RunCompose

func RunCompose(ctx context.Context, args []string) error

RunCompose is a function that is called to run a docker compose command.

func WriteConfig

func WriteConfig(logger log.Logger, data map[string]any, projectID string) (string, error)

WriteConfig writes the config to a file

Types

type ComposeCommandKey

type ComposeCommandKey struct{}

type ComposeFilePathKey

type ComposeFilePathKey struct{}

Context keys

type LoggerKey

type LoggerKey struct{}

Jump to

Keyboard shortcuts

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