plugins

package
v0.0.0-...-ac2c546 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultLogFormat ...
	DefaultLogFormat = "text"
	// DefaultLogLevel ...
	DefaultLogLevel = "warn"
	// DefaultVerbose ...
	DefaultVerbose = false
	// DefaultDebug ...
	DefaultDebug = false
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Opt

type Opt func(*Opts)

Opt ...

func WithDebug

func WithDebug() Opt

WithDebug ...

func WithVerbose

func WithVerbose() Opt

WithVerbose ...

type Opts

type Opts struct {
	// Verbose ...
	Verbose bool
	// Debug ...
	Debug bool
	// LogFormat ...
	LogFormat string
	// LogLevel ...
	LogLevel string
	// Invocation ...
	Invocation string
	// Input ...
	Input string
}

Opts ...

func NewDefaultOpts

func NewDefaultOpts() *Opts

DefaultOpts ...

func NewOpts

func NewOpts(opts ...Opt) *Opts

New ...

func (*Opts) Configure

func (s *Opts) Configure(opts ...Opt) error

Configure ...

type Runtime

type Runtime struct {
	Request  *pb.Request
	Response *pb.Response
	Opts     *Opts
	// contains filtered or unexported fields
}

func New

func New(opts ...Opt) *Runtime

func (*Runtime) Execute

func (r *Runtime) Execute(handler RuntimeHandler) error

type RuntimeHandler

type RuntimeHandler func() (string, error)

Jump to

Keyboard shortcuts

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