Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
Instance used to setup new process instance
func New ¶
func New(runner Runner, processes ProcessesBuilder) *Instance
New used to create new process instance
type Plugin ¶
type Plugin struct { Kill context.CancelFunc Name string ID ID Stdout *utils.Buffer Stderr *utils.Buffer }
Plugin used when running a plugin to save their state and process id information
type ProcessesBuilder ¶
type ProcessesBuilder interface { // Remove used to remove plugin from processes list Remove(string) error // Add used to adding new process Add(Plugin) error // Reset should reset all processes Reset() // IsExist used to check if plugin has a process or not IsExist(name string) bool // Listen used to start observe available streams, if any Listen() (rxgo.Observable, error) // Get used to fetch the plugin info from list of processes or from // data registry Get(string) (Plugin, error) }
ProcessesBuilder is main interface to manipulate list of available processes
type RegistryBuilder ¶
type RegistryBuilder interface { Register(string, Plugin) IsExist(string) bool Delete(string) Get(string) (Plugin, error) Reset() }
RegistryBuilder used to as an interface to build registry of processes registry is like an indexing in database, used to prevent system to scanning all processes
Click to show internal directories.
Click to hide internal directories.