Versions in this module Expand all Collapse all v0 v0.0.3 Apr 10, 2019 Changes in this version + var APPLYCOMPONENT = []byte("apply_component") + var APPLYENTITY = []byte("apply_entity") + var APPLYFEATURE = []byte("apply_feature") + var DATA = []byte("data") + var DEPOPULATE = []byte("depopulate") + var NONE = []byte("none") + var NoServiceError = xrr.Xrror("no service named %s available").Out + var NullResponse []byte + var PING = []byte("ping") + var POPULATEFROMFILES = []byte("populate_from_files") + var QUERY = []byte("query") + var QUERYCOMPONENT = []byte("query_component") + var QUERYENTITY = []byte("query_entity") + var QUERYFEATURE = []byte("query_feature") + var QUIT = []byte("quit") + var STATUS = []byte("status") + var SYSTEM = []byte("system") + var Sep []byte = []byte("++") + var UNKNOWN = []byte("unknown") + var UnknownActionError = xrr.Xrror("unknown action %s").Out + type Action []byte + func ByteAction(s string) Action + func (a Action) String() string + type Config interface + Configure func(*Server) error + Order func() int + func DefaultConfig(fn ConfigFn) Config + func NewConfig(order int, fn ConfigFn) Config + func SetConstructorPluginDirs(dirs ...string) Config + func SetFeatureEnvironment(f env.Env) Config + func SetFeaturePluginDirs(groups []string, dirs ...string) Config + func SetHandler(hs ...*Handler) Config + func SetLogger(l log.Logger) Config + func SetPopulateComponents(groups []string, files ...string) Config + func SetPopulateEntities(groups []string, files ...string) Config + func SetPopulateFeatures(groups []string, files ...string) Config + func SetSocketPath(p string) Config + type ConfigFn func(*Server) error + type Configuration interface + Add func(...Config) + AddFn func(...ConfigFn) + Configure func() error + Configured func() bool + type Handler struct + Action string + Fn HandlerFunc + Service string + func NewHandler(service, action string, fn HandlerFunc) *Handler + type HandlerFunc func(*Server, *Request) []byte + type Handlers struct + func NewHandlers(hn ...*Handler) *Handlers + func (h *Handlers) GetHandle(service, action string) (HandlerFunc, error) + func (h *Handlers) GetRequestedHandle(r *Request) (HandlerFunc, error) + func (h *Handlers) SetHandle(hs ...*Handler) + type Listener struct + Error error + func NewListener(socket string, fn ProcessFunc) *Listener + type ProcessFunc func([]byte) []byte + type Request struct + Action Action + Data *data.Vector + Service Service + func NewRequest(s Service, a Action, d *data.Vector) *Request + func (r *Request) ToByte() []byte + type Response struct + Data *data.Vector + Error string + func EmptyResponse() *Response + func ErrorResponse(e error) *Response + func NewResponse(b []byte) *Response + func (r *Response) ToByte() []byte + type Server struct + func New(c ...Config) *Server + func (s *Server) Close() + func (s *Server) Quit() + func (s *Server) Serve() + func (s *Server) SignalHandler(sig os.Signal) + type Service []byte + func ByteService(s string) Service + func (s Service) String() string + type Space [][]byte + func NewSpace(in []byte) Space + func (s Space) Action() Action + func (s Space) Data() *data.Vector + func (s Space) Service() Service