Documentation
¶
Index ¶
- Variables
- func DefaultRuntimeLoader(c *FactoryConfig) (api.FunctionRuntimeFactory, error)
- func DefaultStateStoreLoader(c *StateStoreConfig) (api.StateStore, error)
- func DefaultTubeLoader(c *FactoryConfig) (contube.TubeFactory, error)
- type Config
- type FactoryConfig
- type RuntimeLoaderType
- type Server
- type ServerOption
- func WithConfig(config *Config) ServerOption
- func WithFunctionManager(opts ...fs.ManagerOption) ServerOption
- func WithHttpListener(listener net.Listener) ServerOption
- func WithHttpTubeFactory(factory *contube.HttpTubeFactory) ServerOption
- func WithRuntimeLoader(loader RuntimeLoaderType) ServerOption
- func WithStateStoreLoader(loader func(c *StateStoreConfig) (api.StateStore, error)) ServerOption
- func WithTubeLoader(loader TubeLoaderType) ServerOption
- type StateStoreConfig
- type StateStoreLoaderType
- type TubeLoaderType
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DefaultRuntimeLoader ¶ added in v0.4.0
func DefaultRuntimeLoader(c *FactoryConfig) (api.FunctionRuntimeFactory, error)
func DefaultStateStoreLoader ¶ added in v0.4.0
func DefaultStateStoreLoader(c *StateStoreConfig) (api.StateStore, error)
func DefaultTubeLoader ¶ added in v0.4.0
func DefaultTubeLoader(c *FactoryConfig) (contube.TubeFactory, error)
Types ¶
type Config ¶ added in v0.4.0
type Config struct { // ListenAddr is the address that the function stream REST service will listen on. ListenAddr string `mapstructure:"listen_addr"` // TubeFactory is the list of tube factories that the function stream server will use. TubeFactory map[string]*FactoryConfig `mapstructure:"tube_factory"` // RuntimeFactory is the list of runtime factories that the function stream server will use. RuntimeFactory map[string]*FactoryConfig `mapstructure:"runtime_factory"` // StateStore is the configuration for the state store that the function stream server will use. // Optional StateStore *StateStoreConfig `mapstructure:"state_store"` }
func LoadConfigFromEnv ¶
func LoadConfigFromFile ¶ added in v0.4.0
type FactoryConfig ¶ added in v0.4.0
type RuntimeLoaderType ¶ added in v0.4.0
type RuntimeLoaderType func(c *FactoryConfig) (api.FunctionRuntimeFactory, error)
type Server ¶
type Server struct { Manager *fs.FunctionManager // contains filtered or unexported fields }
func NewDefaultServer ¶
func NewServer ¶
func NewServer(opts ...ServerOption) (*Server, error)
func (*Server) WaitForReady ¶
type ServerOption ¶
type ServerOption interface {
// contains filtered or unexported methods
}
func WithConfig ¶ added in v0.4.0
func WithConfig(config *Config) ServerOption
func WithFunctionManager ¶
func WithFunctionManager(opts ...fs.ManagerOption) ServerOption
WithFunctionManager sets the function Manager for the server.
func WithHttpListener ¶
func WithHttpListener(listener net.Listener) ServerOption
WithHttpListener sets the listener for the HTTP server. If not set, the server will listen on the Config.ListenAddr.
func WithHttpTubeFactory ¶
func WithHttpTubeFactory(factory *contube.HttpTubeFactory) ServerOption
WithHttpTubeFactory sets the factory for the HTTP tube. If not set, the server will use the default HTTP tube factory.
func WithRuntimeLoader ¶ added in v0.4.0
func WithRuntimeLoader(loader RuntimeLoaderType) ServerOption
WithRuntimeLoader sets the loader for the runtime factory. This must be called before WithConfig.
func WithStateStoreLoader ¶ added in v0.4.0
func WithStateStoreLoader(loader func(c *StateStoreConfig) (api.StateStore, error)) ServerOption
func WithTubeLoader ¶ added in v0.4.0
func WithTubeLoader(loader TubeLoaderType) ServerOption
WithTubeLoader sets the loader for the tube factory. This must be called before WithConfig.
type StateStoreConfig ¶ added in v0.4.0
type StateStoreLoaderType ¶ added in v0.4.0
type StateStoreLoaderType func(c *StateStoreConfig) (api.StateStore, error)
type TubeLoaderType ¶ added in v0.4.0
type TubeLoaderType func(c *FactoryConfig) (contube.TubeFactory, error)
Click to show internal directories.
Click to hide internal directories.