udf

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2018 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 {
	Functions map[string]FunctionConfig `toml:"functions"`
}

func NewConfig

func NewConfig() Config

func (Config) Validate

func (c Config) Validate() error

type Diagnostic added in v1.4.0

type Diagnostic interface {
	LoadedUDFInfo(udf string)

	WithUDFContext() udf.Diagnostic
}

type FunctionConfig

type FunctionConfig struct {
	// General config
	Timeout toml.Duration `toml:"timeout"`

	// Config for connecting to domain socket
	Socket string `toml:"socket"`

	// Config for creating process
	Prog string            `toml:"prog"`
	Args []string          `toml:"args"`
	Env  map[string]string `toml:"env"`
}

func (FunctionConfig) Validate added in v0.13.0

func (c FunctionConfig) Validate() error

type Service

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

func NewService

func NewService(c Config, d Diagnostic) *Service

func (*Service) Close

func (s *Service) Close() error

func (*Service) Create added in v0.13.0

func (s *Service) Create(
	name, taskID, nodeID string,
	d udf.Diagnostic,
	abortCallback func(),
) (udf.Interface, error)

func (*Service) Info added in v0.13.0

func (s *Service) Info(name string) (udf.Info, bool)

func (*Service) List added in v0.13.0

func (s *Service) List() []string

func (*Service) Open

func (s *Service) Open() error

func (*Service) Refresh added in v0.13.0

func (s *Service) Refresh(name string) error

Jump to

Keyboard shortcuts

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