server

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: Apache-2.0 Imports: 20 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartServer

func StartServer(constructor func() interface{}, version string, priority int) error

Start the embedded plugin server, ProtoBuf version. Handles CLI flags, and returns immediately if appropriate. Otherwise, returns only if the server is stopped.

Types

type Error

type Error string

func (Error) Error

func (e Error) Error() string

type InstanceStatus

type InstanceStatus struct {
	Name      string      // plugin name
	Id        int         // instance id
	Config    interface{} // configuration data, decoded
	StartTime int64
}

Current state of a plugin instance. TODO: add some statistics

type PluginConfig

type PluginConfig struct {
	Name   string // plugin name
	Config []byte // configuration data, as a JSON string
}

Configuration data for a new plugin instance.

type StartEventData

type StartEventData struct {
	InstanceId int    // Instance ID to start the event
	EventName  string // event name (not handler method name)

}

Incoming data for a new event. TODO: add some relevant data to reduce number of callbacks.

type StepConsumerData

type StepConsumerData struct {
	EventId int
	Data    entities.Consumer
}

type StepCredentialData

type StepCredentialData struct {
	EventId int
	Data    client.AuthenticatedCredential
}

type StepData

type StepData struct {
	EventId int         // event cycle to which this belongs
	Data    interface{} // carried data
}

A callback's response/request.

type StepErrorData

type StepErrorData struct {
	EventId int
	Data    Error
}

type StepMemoryStatsData

type StepMemoryStatsData struct {
	EventId int
	Data    node.MemoryStats
}

type StepMultiMapData

type StepMultiMapData struct {
	EventId int
	Data    map[string][]string
}

type StepRouteData

type StepRouteData struct {
	EventId int
	Data    entities.Route
}

type StepServiceData

type StepServiceData struct {
	EventId int
	Data    entities.Service
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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