Documentation
¶
Index ¶
- Variables
- func DefaultStateStoreLoader(c *StateStoreConfig) (api.StateStore, error)
- func GetBuiltinRuntimeFactoryBuilder() ...
- func GetBuiltinTubeFactoryBuilder() map[string]func(configMap common.ConfigMap) (contube.TubeFactory, error)
- type Config
- type FactoryConfig
- type FunctionStore
- type FunctionStoreDisabled
- type FunctionStoreImpl
- type QueueConfig
- type RuntimeLoaderType
- type Server
- type ServerOption
- func WithConfig(config *Config) ServerOption
- func WithHttpListener(listener net.Listener) ServerOption
- func WithHttpTubeFactory(factory *contube.HttpTubeFactory) ServerOption
- func WithLogger(log *logr.Logger) ServerOption
- func WithQueueConfig(config QueueConfig) ServerOption
- func WithRuntimeFactoryBuilder(name string, ...) ServerOption
- func WithRuntimeFactoryBuilders(...) ServerOption
- func WithStateStoreLoader(loader func(c *StateStoreConfig) (api.StateStore, error)) ServerOption
- func WithTubeFactoryBuilder(name string, ...) ServerOption
- func WithTubeFactoryBuilders(...) ServerOption
- type StateStoreConfig
- type StateStoreLoaderType
- type TubeLoaderType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnsupportedStateStore = errors.New("unsupported state store") ErrUnsupportedQueueType = errors.New("unsupported queue type") )
Functions ¶
func DefaultStateStoreLoader ¶ added in v0.4.0
func DefaultStateStoreLoader(c *StateStoreConfig) (api.StateStore, error)
func GetBuiltinRuntimeFactoryBuilder ¶ added in v0.5.0
func GetBuiltinTubeFactoryBuilder ¶ added in v0.5.0
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"`
Queue QueueConfig `mapstructure:"queue"`
TubeConfig map[string]common.ConfigMap `mapstructure:"tube-config"`
RuntimeConfig map[string]common.ConfigMap `mapstructure:"runtime-config"`
// StateStore is the configuration for the state store that the function stream server will use.
// Optional
StateStore *StateStoreConfig `mapstructure:"state-store"`
// FunctionStore is the path to the function store
FunctionStore string `mapstructure:"function-store"`
EnableTLS bool `mapstructure:"enable-tls"`
TLSCertFile string `mapstructure:"tls-cert-file"`
TLSKeyFile string `mapstructure:"tls-key-file"`
}
func LoadConfigFromEnv ¶
func LoadConfigFromFile ¶ added in v0.4.0
type FactoryConfig ¶ added in v0.4.0
type FunctionStore ¶ added in v0.5.0
type FunctionStore interface {
Load() error
}
func NewFunctionStoreDisabled ¶ added in v0.5.0
func NewFunctionStoreDisabled() FunctionStore
func NewFunctionStoreImpl ¶ added in v0.5.0
func NewFunctionStoreImpl(fm fs.FunctionManager, path string) (FunctionStore, error)
type FunctionStoreDisabled ¶ added in v0.5.0
type FunctionStoreDisabled struct {
}
func (*FunctionStoreDisabled) Load ¶ added in v0.5.0
func (f *FunctionStoreDisabled) Load() error
type FunctionStoreImpl ¶ added in v0.5.0
type FunctionStoreImpl struct {
// contains filtered or unexported fields
}
func (*FunctionStoreImpl) Load ¶ added in v0.5.0
func (f *FunctionStoreImpl) Load() error
type QueueConfig ¶ added in v0.5.0
type RuntimeLoaderType ¶ added in v0.4.0
type RuntimeLoaderType func(c *FactoryConfig) (api.FunctionRuntimeFactory, error)
type Server ¶
type Server struct {
Manager fs.FunctionManager
FunctionStore FunctionStore
// 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 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 WithLogger ¶ added in v0.5.0
func WithLogger(log *logr.Logger) ServerOption
func WithQueueConfig ¶ added in v0.5.0
func WithQueueConfig(config QueueConfig) ServerOption
func WithRuntimeFactoryBuilder ¶ added in v0.5.0
func WithRuntimeFactoryBuilder( name string, builder func(configMap common.ConfigMap) (api.FunctionRuntimeFactory, error), ) ServerOption
func WithRuntimeFactoryBuilders ¶ added in v0.5.0
func WithRuntimeFactoryBuilders( builder map[string]func(configMap common.ConfigMap) (api.FunctionRuntimeFactory, error), ) ServerOption
func WithStateStoreLoader ¶ added in v0.4.0
func WithStateStoreLoader(loader func(c *StateStoreConfig) (api.StateStore, error)) ServerOption
func WithTubeFactoryBuilder ¶ added in v0.5.0
func WithTubeFactoryBuilder( name string, builder func(configMap common.ConfigMap) (contube.TubeFactory, error), ) ServerOption
func WithTubeFactoryBuilders ¶ added in v0.5.0
func WithTubeFactoryBuilders( builder map[string]func(configMap common.ConfigMap, ) (contube.TubeFactory, error)) ServerOption
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.