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

metrics

package
v0.4.20 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderProject = "baseharbor-metrics"
	ProviderService = "prometheus"
	ProviderImage   = "docker.io/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 DestroyAllSharedProvidersAt added in v0.4.15

func DestroyAllSharedProvidersAt(ctx context.Context, runtime Runtime, dataDir, namespace string) error

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 DestroySharedProvider

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

func ManagementUISurfaceAt added in v0.4.17

func ManagementUISurfaceAt(dataDir, namespace string, m application.Manifest) (application.ManagementUISurface, error)

func ProviderEndpoint

func ProviderEndpoint(files ProviderFiles) (string, error)

func PruneApplicationTargets

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

func PruneApplicationTargetsAt added in v0.4.15

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

func PruneRegisteredApplicationTargets

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

func PruneRegisteredApplicationTargetsAt added in v0.4.15

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

func PublishNetworkName added in v0.4.17

func PublishNetworkName(project string) string

func SharedProbeManifest

func SharedProbeManifest() application.Manifest

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 UnregisterSharedApplication

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

func UnregisterSharedApplicationAt added in v0.4.15

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

func VerifyManagementUIAt added in v0.4.17

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

func VerifyProviderSources added in v0.4.10

func VerifyProviderSources(ctx context.Context, m application.Manifest) error

func VerifyProviderSourcesAt added in v0.4.15

func VerifyProviderSourcesAt(ctx context.Context, m application.Manifest, 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, runtimeCA ...string) *Driver

func NewDriverAt added in v0.4.15

func NewDriverAt(runtime Runtime, app application.Manifest, issuer serviceaccess.Issuer, dataDir, namespace string, runtimeCA ...string) *Driver

func NewDriverWithRealization added in v0.4.19

func NewDriverWithRealization(realization PrometheusRealization, app application.Manifest) *Driver

func (*Driver) Bind

func (d *Driver) Bind(ctx 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 PlacementForAt added in v0.4.15

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

func RegisteredPlacementFor

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

func RegisteredPlacementForAt added in v0.4.15

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

type PrometheusInstance added in v0.4.19

type PrometheusInstance struct {
	Endpoint   string
	HTTPClient *http.Client
}

type PrometheusRealization added in v0.4.19

type PrometheusRealization interface {
	Apply(context.Context) (PrometheusInstance, error)
	Existing(context.Context) (PrometheusInstance, error)
	RegisterTarget(context.Context, PrometheusTarget) error
	Destroy(context.Context) error
}

type PrometheusTarget added in v0.4.19

type PrometheusTarget struct {
	Application string
	Environment string
	Source      string
	Service     string
	Scheme      string
	Port        int
	Path        string
}

type ProviderFiles

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

func EnsureProviderFilesWithRuntimeCA added in v0.4.14

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

func EnsureProviderFilesWithRuntimeCAAt added in v0.4.15

func EnsureProviderFilesWithRuntimeCAAt(ctx context.Context, issuer serviceaccess.Issuer, dataDir, namespace string, m application.Manifest, runtimeCASource 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)

func ExistingRegisteredProviderFiles

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

func ExistingRegisteredProviderFilesAt added in v0.4.15

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

func ExistingSharedProviderInstancesAt added in v0.4.15

func ExistingSharedProviderInstancesAt(dataDir, namespace string) ([]SharedProviderInstance, error)

Jump to

Keyboard shortcuts

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