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

server

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: ISC Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const ListenEnv = "PLAKAR_PLUGIN_LISTEN"

When running over a container plakar sets this to the path of the socket we should be listening on. Empty when running on a default runner.

Variables

View Source
var (
	ErrNotInitialized     = status.Error(codes.FailedPrecondition, "not initialized")
	ErrAlreadyInitialized = status.Error(codes.FailedPrecondition, "already initialized")
)
View Source
var ErrDuplicatePayload = errors.New("duplicate payload id")

ErrDuplicatePayload means the client sent the same payload twice on the same stream, which it must not do.

View Source
var (
	ErrExporterClosed = errors.New("the exporter is closed")
)

Functions

func EntrypointExporter

func EntrypointExporter(ctx context.Context, ctor exporter.ExporterFn, args []string)

func EntrypointImporter

func EntrypointImporter(ctx context.Context, ctor importer.ImporterFn, args []string)

func EntrypointInventory

func EntrypointInventory(ctx context.Context, constructor InventoryFn, args []string)

func EntrypointSecretProvider

func EntrypointSecretProvider(ctx context.Context, constructor SecretProviderFn, args []string)

func EntrypointStorage

func EntrypointStorage(ctx context.Context, ctor storage.StoreFn, args []string)

func InterruptableContext

func InterruptableContext(ctx context.Context) context.Context

InterruptableContext wraps the given context with a signal interrupt channel, that cancels the returned context on signal delivery. After cancelling the context, the signal handler is disarmed, so that subsequent interrupts won't be caught.

func RunExporter

func RunExporter(ctx context.Context, constructor exporter.ExporterFn) error

RunExporter launches the gRPC server for an exporter plugin.

The given constructor will be used to initialize the exporter instance.

func RunExporterOn

func RunExporterOn(ctx context.Context, constructor exporter.ExporterFn, listener net.Listener) error

func RunImporter

func RunImporter(ctx context.Context, constructor importer.ImporterFn) error

RunImporter starts the gRPC server for the importer plugin.

func RunImporterOn

func RunImporterOn(ctx context.Context, constructor importer.ImporterFn, listener net.Listener) error

func RunInventory

func RunInventory(ctx context.Context, constructor InventoryFn) error

func RunInventoryOn

func RunInventoryOn(ctx context.Context, constructor InventoryFn, listener net.Listener) error

func RunSecretProvider

func RunSecretProvider(ctx context.Context, constructor SecretProviderFn) error

func RunSecretProviderOn

func RunSecretProviderOn(ctx context.Context, constructor SecretProviderFn, listener net.Listener) error

func RunStorage

func RunStorage(ctx context.Context, constructor storage.StoreFn) error

RunStorage starts the gRPC server for the storage plugin.

func RunStorageOn

func RunStorageOn(ctx context.Context, constructor storage.StoreFn, listener net.Listener) error

Types

type InventoryFn

type InventoryFn func(context.Context, map[string]string) (integration.Inventory, error)

type SecretProviderFn

type SecretProviderFn func(context.Context, map[string]string) (integration.SecretProvider, error)

Jump to

Keyboard shortcuts

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