juju: github.com/juju/juju/worker/common Index | Files | Directories

package common

import "github.com/juju/juju/worker/common"


Package Files

cleanup.go credentialinvalidator.go

func NewCleanupWorker Uses

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.

func NewCloudCallContext Uses

func NewCloudCallContext(c CredentialAPI, dying context.Dying) context.ProviderCallContext

NewCloudCallContext creates a cloud call context to be used by workers.

type CleanupWorker Uses

type CleanupWorker struct {
    // 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 Uses

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

Report implements dependency.Reporter.

func (*CleanupWorker) Wait Uses

func (w *CleanupWorker) Wait() error

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

type CredentialAPI Uses

type CredentialAPI interface {
    InvalidateModelCredential(reason string) error

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

func NewCredentialInvalidatorFacade Uses

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

NewCredentialInvalidatorFacade creates an API facade capable of invalidating credential.



Package common imports 5 packages (graph) and is imported by 88 packages. Updated 2020-05-14. Refresh now. Tools for package owners.