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

logs

package
v0.4.16 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	LokiImage       = "docker.io/grafana/loki:3.7.8"
	AlloyImage      = "docker.io/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 DestroyProviderAt added in v0.4.15

func DestroyProviderAt(ctx context.Context, runtime Runtime, dataDir, namespace string, m application.Manifest) error

func EnsureProviderSourceOverrideForRuntime added in v0.4.15

func EnsureProviderSourceOverrideForRuntime(m application.Manifest, runtime application.RuntimeFiles, runtimeKind string) (string, bool, error)

func EnsureProviderSourceOverrideForRuntimeAt added in v0.4.15

func EnsureProviderSourceOverrideForRuntimeAt(dataDir, namespace string, m application.Manifest, runtime application.RuntimeFiles, runtimeKind string) (string, bool, error)

func EnsureRuntimeModuleOverrideForRuntimeAt added in v0.4.16

func EnsureRuntimeModuleOverrideForRuntimeAt(
	dataDir string,
	namespace string,
	m application.Manifest,
	dir string,
	filename string,
	project string,
	runtimeKind string,
	class observability.SourceClass,
	allowedServices []string,
) (string, bool, error)

func EnsureRuntimeProjectOverrideForRuntime added in v0.4.15

func EnsureRuntimeProjectOverrideForRuntime(
	m application.Manifest,
	dir string,
	filename string,
	project string,
	runtimeKind string,
	class observability.SourceClass,
) (string, bool, error)

func EnsureRuntimeProjectOverrideForRuntimeAt added in v0.4.15

func EnsureRuntimeProjectOverrideForRuntimeAt(
	dataDir string,
	namespace string,
	m application.Manifest,
	dir string,
	filename string,
	project string,
	runtimeKind string,
	class observability.SourceClass,
) (string, bool, error)

func EnsureWorkloadOverride

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

func EnsureWorkloadOverrideForRuntime added in v0.4.14

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

func EnsureWorkloadOverrideForRuntimeAt added in v0.4.15

func EnsureWorkloadOverrideForRuntimeAt(dataDir, namespace string, m application.Manifest, runtime application.RuntimeFiles, services []string, runtimeKind string) (string, error)

func ExistingProviderSourceOverride added in v0.4.15

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

func ExistingWorkloadOverride

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

func ProviderEndpoint

func ProviderEndpoint(files ProviderFiles) (string, error)

func RemoveProviderSourceOverride added in v0.4.15

func RemoveProviderSourceOverride(runtime application.RuntimeFiles) error

func RemoveWorkloadOverride

func RemoveWorkloadOverride(runtime application.RuntimeFiles) error

func RestoreApplicationHistoryAt added in v0.4.16

func RestoreApplicationHistoryAt(ctx context.Context, m application.Manifest, dataDir, namespace string, backup HistoryBackup) error

func StopProvider

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

func StopProviderAt added in v0.4.15

func StopProviderAt(ctx context.Context, runtime Runtime, dataDir, namespace string, m application.Manifest) error

func UnregisterApplication

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

func UnregisterApplicationAt added in v0.4.15

func UnregisterApplicationAt(ctx context.Context, runtime Runtime, issuer serviceaccess.Issuer, dataDir, namespace string, m application.Manifest) error

func VerifyApplication

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

func VerifyApplicationAt added in v0.4.15

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

func VerifyProviderSources added in v0.4.15

func VerifyProviderSources(ctx context.Context, m application.Manifest, sources []observability.SignalSource) error

func VerifyProviderSourcesAt added in v0.4.15

func VerifyProviderSourcesAt(ctx context.Context, m application.Manifest, sources []observability.SignalSource, dataDir, namespace string) error

Types

type Driver

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

func NewDriver

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

func NewDriverAt added in v0.4.15

func NewDriverAt(runtime Runtime, app application.Manifest, issuer serviceaccess.Issuer, dataDir, namespace string) *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 HistoryBackup added in v0.4.16

type HistoryBackup struct {
	Streams []HistoryStream `json:"streams"`
}

func ExportApplicationHistoryAt added in v0.4.16

func ExportApplicationHistoryAt(ctx context.Context, m application.Manifest, dataDir, namespace string) (HistoryBackup, error)

type HistoryEntry added in v0.4.16

type HistoryEntry struct {
	Timestamp string `json:"timestamp"`
	Line      string `json:"line"`
}

type HistoryStream added in v0.4.16

type HistoryStream struct {
	Labels  map[string]string `json:"labels"`
	Entries []HistoryEntry    `json:"entries"`
}

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)

func PlacementForAt added in v0.4.15

func PlacementForAt(dataDir, namespace string, m application.Manifest) (Placement, error)

type ProviderFiles

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

func EnsureProviderFilesForRuntime added in v0.4.14

func EnsureProviderFilesForRuntime(ctx context.Context, issuer serviceaccess.Issuer, m application.Manifest, runtimeKind string) (ProviderFiles, error)

func EnsureProviderFilesForRuntimeAt added in v0.4.15

func EnsureProviderFilesForRuntimeAt(ctx context.Context, issuer serviceaccess.Issuer, dataDir, namespace string, m application.Manifest, runtimeKind string) (ProviderFiles, error)

func ExistingProviderFiles

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

func ExistingProviderFilesAt added in v0.4.15

func ExistingProviderFilesAt(dataDir, namespace string, m application.Manifest) (ProviderFiles, error)

type Registration

type Registration struct {
	Application        string `json:"application"`
	Environment        string `json:"environment"`
	Namespace          string `json:"namespace,omitempty"`
	SyslogPort         int    `json:"syslog_port"`
	ProviderSyslogPort int    `json:"provider_syslog_port"`
}

func ApplicationRegistration

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

func ApplicationRegistrationAt added in v0.4.15

func ApplicationRegistrationAt(dataDir, namespace string, 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