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

metrics

package
v0.4.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ProviderProject = "baseharbor-metrics"
	ProviderService = "prometheus"
	ProviderImage   = "prom/prometheus:v3.14.0"
)
View Source
const RuntimeCapabilityV1 = "metrics/v1"

Variables

This section is empty.

Functions

func DesiredTargetFiles

func DesiredTargetFiles(m application.Manifest) map[string]struct{}

func DestroyAllSharedProviders

func DestroyAllSharedProviders(ctx context.Context, runtime Runtime) error

func DestroyProvider

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

func DestroySharedProvider

func DestroySharedProvider(ctx context.Context, runtime Runtime) error

func ProviderEndpoint

func ProviderEndpoint(files ProviderFiles) (string, error)

func PruneApplicationTargets

func PruneApplicationTargets(m application.Manifest, desired map[string]struct{}) error

func PruneRegisteredApplicationTargets

func PruneRegisteredApplicationTargets(m application.Manifest, desired map[string]struct{}) error

func SharedProbeManifest

func SharedProbeManifest() application.Manifest

func StopProvider

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

func UnregisterSharedApplication

func UnregisterSharedApplication(ctx context.Context, runtime Runtime, m application.Manifest) 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, resource capability.Resource, _ capability.Binding) error

type Placement

type Placement struct {
	Scope   capability.ProviderScope
	Project string
	Network string
	Volume  string
	Dir     string
}

func PlacementFor

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

func RegisteredPlacementFor

func RegisteredPlacementFor(m application.Manifest) (Placement, bool, error)

type ProviderFiles

type ProviderFiles struct {
	Dir           string
	Compose       string
	Env           string
	Config        string
	TargetsDir    string
	Registrations string
}

func EnsureProviderFiles

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

func ExistingProviderFiles

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

func ExistingRegisteredProviderFiles

func ExistingRegisteredProviderFiles(m application.Manifest) (ProviderFiles, bool, error)

func ExistingSharedProviderFiles

func ExistingSharedProviderFiles() (ProviderFiles, error)

type Runtime

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

type RuntimeSourceExecutor

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

func NewRuntimeSourceExecutor

func NewRuntimeSourceExecutor(environment, targetsDir string) (*RuntimeSourceExecutor, error)

func (*RuntimeSourceExecutor) Execute

type SharedProviderInstance

type SharedProviderInstance struct {
	Placement Placement
	Files     ProviderFiles
}

func ExistingSharedProviderInstances

func ExistingSharedProviderInstances() ([]SharedProviderInstance, error)

Jump to

Keyboard shortcuts

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