proto

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: Apache-2.0 Imports: 1 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 FileType

type FileType string
const (
	FileTypePlugin         FileType = "plugins"
	FileTypePipelineConfig FileType = "pipelines"
)

type Metadata

type Metadata interface {
	AddPath(ft FileType, path string) error
	RemovePath(ft FileType, path string) error
	GetPath(ft FileType, filename string) string
	ExistsPath(ft FileType, path string) bool
	ListPaths(ft FileType) []string
	Overwrite(ft FileType, path string, data []byte) error
}

type MetadataView

type MetadataView struct {
	PluginPaths         []string `json:"plugin_paths" yaml:"plugin_paths"`
	PipelineConfigPaths []string `json:"pipeline_config_paths" yaml:"pipeline_config_paths"`
	HTTPAddr            string   `json:"http_addr" yaml:"http_addr"`
}

type Pipeline

type Pipeline interface {
	GenerateConfig(name, schdule string, components, processors []string) (*pipe.Config, error)
	Add(conf pipe.Config) error
	Recreate(conf pipe.Config) error
	List() ([]PipelineView, error)
	Find(name string) (*PipelineView, error)
	Control(cmd ControlCommand, names []string) error
}

type PipelineView

type PipelineView 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,emitempty"`
	Processors    []ProcessorView `json:"processors,emitempty"`
	RawConfig     []byte          `json:"raw_config,emitempty"`
}

type Plugin

type Plugin interface {
	List() ([]PluginView, error)
	Open(path string) error
	Add(path string) error
}

type PluginOpenRequest

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

type PluginView

type PluginView struct {
	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 VisualizeFormat

type VisualizeFormat string
const (
	VisualizeFormatSVG        VisualizeFormat = "svg"
	VisualizeFormatRaw        VisualizeFormat = "raw"
	VisualizeFormatDot        VisualizeFormat = "dot"
	VisualizeFormatASCIITable VisualizeFormat = "ascii_table"
)

Jump to

Keyboard shortcuts

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