execute

package
v0.0.0-...-4450389 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Cmd     string
	CmdArgs []string
}

type Logger

type Logger interface {
	Infow(msg string, kv ...interface{})
	Warnw(msg string, kv ...interface{})
	Errorw(msg string, kv ...interface{})
}

type Processor

type Processor struct {
	// contains filtered or unexported fields
}

func NewProcessor

func NewProcessor(ctxSlow context.Context, lg Logger, cfg *Config) *Processor

func (*Processor) ProcessRepo

func (p *Processor) ProcessRepo(ctx context.Context, repo *Repo) error

func (*Processor) ProcessRepoId

func (p *Processor) ProcessRepoId(ctx context.Context, repoId uuid.I) error

`ProcessRepoId()` is currently unused. It is a reminder that we may consider adding alternative calling conventions. For example, it may be faster to avoid fetching repo details from the registry and only pass the repo ID instead.

Further ideas, which may be useful if process creation overhead turns out to be a problem:

  • Pass multipe repos in a single run, like xargs.
  • Pass repos via stdin, expecting the command to confirm processing on stdout.

type Repo

type Repo struct {
	Id                     uuid.I   `json:"id"`
	Vid                    ulid.I   `json:"vid"`
	Registry               string   `json:"registry"`
	GlobalPath             string   `json:"globalPath"`
	File                   string   `json:"file,omitempty"`
	Shadow                 string   `json:"shadow,omitempty"`
	Archive                string   `json:"archive,omitempty"`
	ArchiveRecipients      []string `json:"archiveRecipients,omitempty"`
	ShadowBackup           string   `json:"shadowBackup,omitempty"`
	ShadowBackupRecipients []string `json:"shadowBackupRecipients,omitempty"`
}

Jump to

Keyboard shortcuts

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