Help us shape the future of Go! Take the 2026 Go Developer Survey

logs

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LokiImage       = "grafana/loki:3.7.8"
	AlloyImage      = "grafana/alloy:v1.19.2"
	LokiRuntimeUID  = 10001
	LokiRuntimeGID  = 10001
	AlloyRuntimeUID = 473
	AlloyRuntimeGID = 473
)

Variables

This section is empty.

Functions

func DestroyProvider

func DestroyProvider(ctx context.Context, runtime Runtime, m application.Manifest) error

func EnsureWorkloadOverride

func EnsureWorkloadOverride(m application.Manifest, runtime application.RuntimeFiles, services []string) (string, error)

func ExistingWorkloadOverride

func ExistingWorkloadOverride(runtime application.RuntimeFiles) (string, bool, error)

func ProviderEndpoint

func ProviderEndpoint(files ProviderFiles) (string, error)

func RemoveWorkloadOverride

func RemoveWorkloadOverride(runtime application.RuntimeFiles) error

func StopProvider

func StopProvider(ctx context.Context, runtime Runtime, m application.Manifest) error

func UnregisterApplication

func UnregisterApplication(ctx context.Context, runtime Runtime, m application.Manifest) error

func VerifyApplication

func VerifyApplication(ctx context.Context, m application.Manifest, services []string) error

Types

type Driver

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

func NewDriver

func NewDriver(runtime Runtime, app application.Manifest) *Driver

func (*Driver) Bind

func (d *Driver) Bind(_ context.Context, resource capability.Resource, binding capability.Binding) error

func (*Driver) Descriptor

func (d *Driver) Descriptor() capability.Provider

func (*Driver) Preflight

func (d *Driver) Preflight(_ context.Context, resource capability.Resource, binding capability.Binding) error

func (*Driver) Provision

func (d *Driver) Provision(ctx context.Context, _ capability.Resource, _ capability.Binding) error

func (*Driver) Verify

func (d *Driver) Verify(ctx context.Context, _ capability.Resource, binding capability.Binding) error

type Placement

type Placement struct {
	Scope            capability.ProviderScope
	Project          string
	Network          string
	Dir              string
	LokiVolume       string
	AlloyVolume      string
	SharingBoundary  string
	OwnerApplication string
}

func PlacementFor

func PlacementFor(m application.Manifest) (Placement, error)

type ProviderFiles

type ProviderFiles struct {
	Dir           string
	Compose       string
	Env           string
	LokiConfig    string
	AlloyConfig   string
	Registrations string
}

func EnsureProviderFiles

func EnsureProviderFiles(m application.Manifest) (ProviderFiles, error)

func ExistingProviderFiles

func ExistingProviderFiles(m application.Manifest) (ProviderFiles, error)

type Registration

type Registration struct {
	Application string `json:"application"`
	Environment string `json:"environment"`
	SyslogPort  int    `json:"syslog_port"`
}

func ApplicationRegistration

func ApplicationRegistration(m application.Manifest) (Registration, error)

type Runtime

type Runtime interface {
	ConfigProject(context.Context, string, string, string) error
	UpProject(context.Context, string, string, string) error
	StopProject(context.Context, string, string, string) error
	DestroyProject(context.Context, string, string, string) error
}

Jump to

Keyboard shortcuts

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