common

package
v0.0.0-...-5175f08 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCleanupWorker

func NewCleanupWorker(w worker.Worker, cleanup func()) worker.Worker

NewCleanupWorker returns a worker that ensures a cleanup function is run after the underlying worker is finished.

Types

type CleanupWorker

type CleanupWorker struct {
	worker.Worker
	// contains filtered or unexported fields
}

CleanupWorker wraps another worker to ensure a func is run when it is finished. (Public for manifolds that need access to the wrapped worker for output.)

func (*CleanupWorker) Report

func (w *CleanupWorker) Report() map[string]interface{}

Report implements dependency.Reporter.

func (*CleanupWorker) Unwrap

func (c *CleanupWorker) Unwrap() worker.Worker

Unwrap exposes the wrapped worker.

func (*CleanupWorker) Wait

func (w *CleanupWorker) Wait() error

Wait ensures the cleanup func is run after the worker finishes.

type CloudCallContextFunc

type CloudCallContextFunc func(ctx stdcontext.Context) envcontext.ProviderCallContext

CloudCallContextFunc is a function returning a ProviderCallContext.

func NewCloudCallContextFunc

func NewCloudCallContextFunc(c CredentialAPI) CloudCallContextFunc

NewCloudCallContextFunc creates a function returning a cloud call context to be used by workers.

type CredentialAPI

type CredentialAPI interface {
	InvalidateModelCredential(ctx stdcontext.Context, reason string) error
}

CredentialAPI exposes functionality of the credential validator API facade to a worker.

func NewCredentialInvalidatorFacade

func NewCredentialInvalidatorFacade(apiCaller base.APICaller) (CredentialAPI, error)

NewCredentialInvalidatorFacade creates an API facade capable of invalidating credential.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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