Documentation ¶
Index ¶
- Constants
- func NewExecutor(i *interfaceInfo) (executor, error)
- func ProtoParser() *protoparse.Parser
- type ExternalFunc
- type Manager
- func (m *Manager) ConvName(funcName string) (string, bool)
- func (m *Manager) Create(r *ServiceCreationRequest) error
- func (m *Manager) Delete(name string) error
- func (m *Manager) Function(name string) (api.Function, error)
- func (m *Manager) FunctionPluginInfo(funcName string) (plugin.EXTENSION_TYPE, string, string)
- func (m *Manager) Get(name string) (*serviceInfo, error)
- func (m *Manager) GetAllServices() map[string]string
- func (m *Manager) GetAllServicesStatus() map[string]string
- func (m *Manager) GetFunction(name string) (*functionContainer, error)
- func (m *Manager) HasFunctionSet(_ string) bool
- func (m *Manager) HasService(name string) bool
- func (m *Manager) ImportPartialServices(ctx context.Context, services map[string]string) map[string]string
- func (m *Manager) ImportServices(ctx context.Context, services map[string]string) map[string]string
- func (m *Manager) InitByFiles() error
- func (m *Manager) List() ([]string, error)
- func (m *Manager) ListFunctions() ([]*functionContainer, error)
- func (m *Manager) UninstallAllServices()
- func (m *Manager) Update(req *ServiceCreationRequest) error
- type ServiceCreationRequest
Constants ¶
View Source
const ( REST protocol = "rest" GRPC protocol = "grpc" MSGPACK protocol = "msgpack-rpc" )
View Source
const ( PROTOBUFF schema = "protobuf" SCHEMALESS schema = "" )
Variables ¶
This section is empty.
Functions ¶
func NewExecutor ¶
func NewExecutor(i *interfaceInfo) (executor, error)
NewExecutor Each interface definition maps to one executor instance. It is supposed to have only one thread running.
func ProtoParser ¶
func ProtoParser() *protoparse.Parser
Types ¶
type ExternalFunc ¶
type ExternalFunc struct {
// contains filtered or unexported fields
}
func (*ExternalFunc) Exec ¶
func (f *ExternalFunc) Exec(args []interface{}, ctx api.FunctionContext) (interface{}, bool)
func (*ExternalFunc) IsAggregate ¶
func (f *ExternalFunc) IsAggregate() bool
func (*ExternalFunc) Validate ¶
func (f *ExternalFunc) Validate(_ []interface{}) error
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func GetManager ¶
func GetManager() *Manager
func InitManager ¶
func (*Manager) Create ¶
func (m *Manager) Create(r *ServiceCreationRequest) error
func (*Manager) FunctionPluginInfo ¶
func (*Manager) GetAllServices ¶
func (*Manager) GetAllServicesStatus ¶
func (*Manager) GetFunction ¶
func (*Manager) HasFunctionSet ¶
func (*Manager) HasService ¶
func (*Manager) ImportPartialServices ¶
func (*Manager) ImportServices ¶
func (*Manager) InitByFiles ¶
InitByFiles *
- This function will parse the service definition json files in etc/services.
- It will validate all json files and their schemaFiles. If invalid, it just prints
- an error log and ignore. So it is possible that only valid service definition are
- parsed and available. *
- NOT threadsafe, must run in lock
func (*Manager) ListFunctions ¶
func (*Manager) UninstallAllServices ¶
func (m *Manager) UninstallAllServices()
func (*Manager) Update ¶
func (m *Manager) Update(req *ServiceCreationRequest) error
type ServiceCreationRequest ¶
func (*ServiceCreationRequest) InstallScript ¶
func (s *ServiceCreationRequest) InstallScript() string
Click to show internal directories.
Click to hide internal directories.