takodclient

package
v0.4.18 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JSONRequestTimeout   = 2 * time.Minute
	StreamRequestTimeout = 30 * time.Minute
)
View Source
const DefaultSocket = "/run/tako/takod.sock"

Variables

This section is empty.

Functions

func AccessLogsEndpoint

func AccessLogsEndpoint(tail int, follow bool) string

func ActualStateEndpoint

func ActualStateEndpoint(project string, environment string) string

func BackupsEndpoint

func BackupsEndpoint(project string, environment string, volume string, backupID string) string

func EnvBundleEndpoint

func EnvBundleEndpoint(project string, environment string) string

func ImageBuildEndpoint

func ImageBuildEndpoint(image string, dockerfile ...string) string

func LeaseEndpoint

func LeaseEndpoint(project string, environment string) string

func LogsEndpoint

func LogsEndpoint(project string, environment string, service string, tail int, follow bool) string

func MetricsEndpoint

func MetricsEndpoint(collect bool) string

func ProxyFileEndpoint

func ProxyFileEndpoint(name string) string

func RequestJSON

func RequestJSON(client RequestExecutor, socket string, method string, endpoint string, value any) (string, error)

func RequestJSONWithTimeout added in v0.4.1

func RequestJSONWithTimeout(client RequestExecutor, socket string, method string, endpoint string, value any, timeout time.Duration) (string, error)

func StateEndpoint

func StateEndpoint(project string, environment string, document string) string

func StateNodeEndpoint

func StateNodeEndpoint(project string, environment string, document string, node string) string

func StateRevisionEndpoint

func StateRevisionEndpoint(project string, environment string, document string, revisionID string) string

func StatsEndpoint

func StatsEndpoint(project string, environment string, service string, all bool) string

func StreamOutput

func StreamOutput(client StreamExecutor, socket string, endpoint string, stdout io.Writer, stderr io.Writer) error

func StreamRequest

func StreamRequest(client RequestExecutor, socket string, method string, endpoint string, reader io.Reader) (string, error)

Types

type RequestExecutor

type RequestExecutor interface {
	ExecuteWithContext(ctx context.Context, cmd string) (string, error)
	ExecuteWithInput(ctx context.Context, cmd string, input io.Reader) (string, error)
}

type StreamExecutor

type StreamExecutor interface {
	RequestExecutor
	ExecuteStream(cmd string, stdout io.Writer, stderr io.Writer) error
}

Jump to

Keyboard shortcuts

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