gw

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultOrgName  = "Default"
	DefaultTeamName = "default"
	DefaultTeamID   = "00000000-0000-0000-0000-000000000000"
)
View Source
const (
	EnvGRPCAddress = "GRPC_ADDR"
	EnvMagicKey    = "GRPC_MAGIC_KEY"
	EnvMagicValue  = "d0c08ee0-a663-4a6b-ad5e-00a5fca1e5cf"
	EnvCAFile      = "GRPC_CA_CERT_FILE"
	EnvCertFile    = "GRPC_CLIENT_CERT_FILE"
	EnvKeyFile     = "GRPC_CLIENT_KEY_FILE"
	EnvOrgName     = "CONCORD_ORG_NAME"
	EnvProcessID   = "CONCORD_PROCESS_ID"
	EnvWorkingDir  = "CONCORD_WORKING_DIRECTORY"
)
View Source
const (
	ErrNoMagicKey = Error("no magic key provided")
	ErrNoGRPCAddr = Error("no grpc address provided")
)

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, tr TaskRunner) error

Run a function

Types

type Error

type Error string

func (Error) Error

func (e Error) Error() string

type Task

type Task struct {
	OrgName    string
	WorkingDir string
	ProcessID  string
	// contains filtered or unexported fields
}

func (*Task) Close

func (c *Task) Close() error

func (*Task) Config

func (c *Task) Config() *config.Service

Config returns a service for retrieving process configuration

func (*Task) Context

func (c *Task) Context() *taskcontext.Service

Context returns a service for interacting with the process context such as setting and getting variabes, and evaluating the results of Java Expressions in JEL 3.0

func (*Task) Docker

func (c *Task) Docker() *docker.Service

Docker returns a service for running Docker containers

func (*Task) JSONStore added in v0.2.0

func (c *Task) JSONStore(name string) *jsonstore.Store

JSONStore returns a jsonstore.Store for the given store name The store should already exist, otherwise operations will fail. This store should be in the current Org of the process.

func (*Task) KV

func (c *Task) KV() *kv.Service

KV returns a service for interacting with the project's key-value storage system

func (*Task) Lock

func (c *Task) Lock() *lock.Service

Lock returns a service for setting project-level locks

func (*Task) Log

func (c *Task) Log(ctx context.Context, format string, v ...interface{}) error

Log emits a log entry on the process.

func (*Task) Secret

func (c *Task) Secret() *secret.Service

Secret returns a service for manipulating secrets within the current Organization

type TaskRunner added in v0.4.0

type TaskRunner interface {
	Run(ctx context.Context, ts *Task) (map[string]value.Value, error)
}

type TaskRunnerFunc added in v0.4.0

type TaskRunnerFunc func(ctx context.Context, ts *Task) (map[string]value.Value, error)

func (TaskRunnerFunc) Run added in v0.4.0

func (f TaskRunnerFunc) Run(ctx context.Context, ts *Task) (map[string]value.Value, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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