Documentation
¶
Index ¶
- Constants
- Variables
- func EntrypointExporter(ctx context.Context, ctor exporter.ExporterFn, args []string)
- func EntrypointImporter(ctx context.Context, ctor importer.ImporterFn, args []string)
- func EntrypointInventory(ctx context.Context, constructor InventoryFn, args []string)
- func EntrypointSecretProvider(ctx context.Context, constructor SecretProviderFn, args []string)
- func EntrypointStorage(ctx context.Context, ctor storage.StoreFn, args []string)
- func InterruptableContext(ctx context.Context) context.Context
- func RunExporter(ctx context.Context, constructor exporter.ExporterFn) error
- func RunExporterOn(ctx context.Context, constructor exporter.ExporterFn, listener net.Listener) error
- func RunImporter(ctx context.Context, constructor importer.ImporterFn) error
- func RunImporterOn(ctx context.Context, constructor importer.ImporterFn, listener net.Listener) error
- func RunInventory(ctx context.Context, constructor InventoryFn) error
- func RunInventoryOn(ctx context.Context, constructor InventoryFn, listener net.Listener) error
- func RunSecretProvider(ctx context.Context, constructor SecretProviderFn) error
- func RunSecretProviderOn(ctx context.Context, constructor SecretProviderFn, listener net.Listener) error
- func RunStorage(ctx context.Context, constructor storage.StoreFn) error
- func RunStorageOn(ctx context.Context, constructor storage.StoreFn, listener net.Listener) error
- type InventoryFn
- type SecretProviderFn
Constants ¶
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 ¶
var ( ErrNotInitialized = status.Error(codes.FailedPrecondition, "not initialized") ErrAlreadyInitialized = status.Error(codes.FailedPrecondition, "already initialized") )
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.
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 InterruptableContext ¶
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 RunImporter ¶
func RunImporter(ctx context.Context, constructor importer.ImporterFn) error
RunImporter starts the gRPC server for the importer plugin.
func RunImporterOn ¶
func RunInventory ¶
func RunInventory(ctx context.Context, constructor InventoryFn) error
func RunInventoryOn ¶
func RunSecretProvider ¶
func RunSecretProvider(ctx context.Context, constructor SecretProviderFn) error
func RunSecretProviderOn ¶
func RunStorage ¶
RunStorage starts the gRPC server for the storage plugin.
Types ¶
type InventoryFn ¶
type SecretProviderFn ¶
type SecretProviderFn func(context.Context, map[string]string) (integration.SecretProvider, error)