proto

package
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component interface {
	List() ([]ComponentView, error)
	Find(name string) (*ComponentView, error)
}

type ComponentView

type ComponentView struct {
	Name         string `json:"name"`
	RawConfig    string `json:"raw_config,omitempty"`
	SampleConfig string `json:"sample_config"`
	Description  string `json:"description"`
	InjectName   string `json:"inject_name,omitempty"`
	ReflectType  string `json:"reflect_type,omitempty"`
	ReflectValue string `json:"reflect_value,omitempty"`
}

type ControlCommand

type ControlCommand string
const (
	ControlCommandStart   ControlCommand = "start"
	ControlCommandStop    ControlCommand = "stop"
	ControlCommandRestart ControlCommand = "restart"
)

type Executor added in v1.0.13

type Executor interface {
	Add(_type string, config []byte) error
	Remove(executorInstanceIDs ...string) error
	Recreate(_type string, config []byte) error
	List() ([]ExecutorView, error)
	Find(executorInstanceID string) (*ExecutorView, error)
	Control(cmd ControlCommand, executorInstanceIDs ...string) error
	Visualize(format VisualizeFormat, executorInstanceID string) ([]byte, error)
}

type ExecutorView added in v1.0.13

type ExecutorView struct {
	Name             string          `json:"name"`
	State            string          `json:"state"`
	Schedule         string          `json:"schedule"`
	Bootstrap        bool            `json:"bootstrap"`
	StartTime        string          `json:"start_time"`
	ExitTime         string          `json:"exit_time"`
	RunTimes         string          `json:"run_times"`
	NextRunTime      string          `json:"next_run_time"`
	LastStartTime    string          `json:"last_start_time"`
	LastEndTime      string          `json:"last_end_time"`
	Components       []ComponentView `json:"components"`
	Processors       []ProcessorView `json:"processors"`
	RawConfig        []byte          `json:"raw_config"`
	Error            string          `json:"error"`
	StreamError      string          `json:"stream_error"`
	StreamErrorCount int             `json:"stream_error_count"`
}

type FileType

type FileType string
const (
	FileTypePlugin         FileType = "plugins"
	FileTypeExecutorConfig FileType = "executors"
)

type GenerateConfigRequest added in v1.0.5

type GenerateConfigRequest struct {
	Type   string `json:"type"`
	Config []byte `json:"config"`
}

type Metadata

type Metadata interface {
	PutPlugin(name string, bin []byte) (path string, err error)
	PutExecutorRawConfig(_type, name string, raw []byte) (path string, err error)
	AddPluginPath(path string) error
	AddExecutorConfigPath(_type, path string) error
	RemovePluginPath(path string) error
	RemoveExecutorConfigPath(_type, path string) error
	Snapshot(do func(Snapshot))
}

type MetadataView

type MetadataView struct {
	PluginPaths         []string            `json:"plugin_paths" yaml:"plugin_paths"`
	ExecutorConfigPaths map[string][]string `json:"executor_config_paths" yaml:"executor_config_paths"`
	HTTPAddr            string              `json:"http_addr" yaml:"http_addr"`
	Version             string              `json:"version" yaml:"version"`
	Branch              string              `json:"branch" yaml:"branch"`
	Commit              string              `json:"commit" yaml:"commit"`
	Built               string              `json:"built" yaml:"built"`
}

type Plugin

type Plugin interface {
	Add(name string, bin []byte) error
	AddPath(path string) error
	Remove(names ...string) error
	List() ([]PluginView, error)
}

type PluginOpenRequest

type PluginOpenRequest struct {
	Path string `json:"path"`
}

type PluginView

type PluginView struct {
	Name     string `json:"name"`
	Path     string `json:"path"`
	Module   string `json:"module"`
	OpenTime string `json:"open_time"`
}

type Processor

type Processor interface {
	List() ([]ProcessorView, error)
	Find(name string) (*ProcessorView, error)
}

type ProcessorView

type ProcessorView struct {
	Name         string `json:"name"`
	RawConfig    string `json:"raw_config,omitempty"`
	SampleConfig string `json:"sample_config"`
	Description  string `json:"description"`
}

type Result

type Result struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

type Server

type Server interface {
	Metadata() (MetadataView, error)
}

type Snapshot added in v1.0.13

type Snapshot struct {
	PluginPaths         []string
	ExecutorConfigPaths map[string][]string // key: executor type
}

type VisualizeFormat

type VisualizeFormat string
const (
	VisualizeFormatSVG  VisualizeFormat = "svg"
	VisualizeFormatPng  VisualizeFormat = "png"
	VisualizeFormatDot  VisualizeFormat = "dot"
	VisualizeFormatTerm VisualizeFormat = "term"
)

Jump to

Keyboard shortcuts

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