Documentation
¶
Overview ¶
Package servers implements the components required for the servers.
Index ¶
- func NewCommunityServerInitializer(displayName string, serviceKinds []services.ServiceKind) (servers.ServerInitializer, error)
- type CommunityServerInitializer
- func (c *CommunityServerInitializer) HasCentralStorage() bool
- func (c *CommunityServerInitializer) HostInfo() *services.HostInfo
- func (c *CommunityServerInitializer) Services() []services.ServiceKind
- func (c *CommunityServerInitializer) ServicesFactories() (map[services.ServiceKind]services.ServiceFactoryProvider, error)
- func (c *CommunityServerInitializer) Storages(centralStorageEngine storage.Kind) []storage.Kind
- func (c *CommunityServerInitializer) StoragesFactories(centralStorageEngine storage.Kind) (map[storage.Kind]storage.FactoryProvider, error)
- type Server
- type ServerConfig
- func (c *ServerConfig) AddFlags(flagSet *flag.FlagSet) error
- func (c *ServerConfig) AppData() string
- func (c *ServerConfig) CentralStorageEngine() storage.Kind
- func (c *ServerConfig) DisplayName() string
- func (c *ServerConfig) InitFromViper(v *viper.Viper) error
- func (c *ServerConfig) Services() []services.ServiceKind
- func (c *ServerConfig) ServicesFactories() map[services.ServiceKind]services.ServiceFactoryProvider
- func (c *ServerConfig) Storages() []storage.Kind
- func (c *ServerConfig) StoragesFactories() map[storage.Kind]storage.FactoryProvider
- type ServerFactory
- type ServerFactoryConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCommunityServerInitializer ¶
func NewCommunityServerInitializer(displayName string, serviceKinds []services.ServiceKind) (servers.ServerInitializer, error)
NewCommunityServerInitializer creates a new community server initializer.
Types ¶
type CommunityServerInitializer ¶
type CommunityServerInitializer struct {
// contains filtered or unexported fields
}
CommunityServerInitializer is the community service factory initializer.
func (*CommunityServerInitializer) HasCentralStorage ¶
func (c *CommunityServerInitializer) HasCentralStorage() bool
HasCentralStorage returns true if a central storage is required.
func (*CommunityServerInitializer) HostInfo ¶ added in v0.0.7
func (c *CommunityServerInitializer) HostInfo() *services.HostInfo
HostInfo returns the infos of the service kind set as host.
func (*CommunityServerInitializer) Services ¶ added in v0.0.7
func (c *CommunityServerInitializer) Services() []services.ServiceKind
Services returns the active service kinds.
func (*CommunityServerInitializer) ServicesFactories ¶ added in v0.0.7
func (c *CommunityServerInitializer) ServicesFactories() (map[services.ServiceKind]services.ServiceFactoryProvider, error)
ServicesFactories returns the service factories providers.
func (*CommunityServerInitializer) Storages ¶ added in v0.0.7
func (c *CommunityServerInitializer) Storages(centralStorageEngine storage.Kind) []storage.Kind
Storages returns the active storage kinds.
func (*CommunityServerInitializer) StoragesFactories ¶ added in v0.0.7
func (c *CommunityServerInitializer) StoragesFactories(centralStorageEngine storage.Kind) (map[storage.Kind]storage.FactoryProvider, error)
StoragesFactories returns the storage factories providers.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents the applicative server.
func (*Server) DisplayName ¶ added in v0.0.20
DisplayName returns the display name.
type ServerConfig ¶
type ServerConfig struct {
// contains filtered or unexported fields
}
ServerConfig holds the configuration for the server.
func (*ServerConfig) AddFlags ¶
func (c *ServerConfig) AddFlags(flagSet *flag.FlagSet) error
AddFlags adds flags.
func (*ServerConfig) AppData ¶ added in v0.0.7
func (c *ServerConfig) AppData() string
AppData returns the zone data.
func (*ServerConfig) CentralStorageEngine ¶ added in v0.0.7
func (c *ServerConfig) CentralStorageEngine() storage.Kind
CentralStorageEngine returns the central storage engine.
func (*ServerConfig) DisplayName ¶ added in v0.0.20
func (c *ServerConfig) DisplayName() string
DisplayName returns the display name.
func (*ServerConfig) InitFromViper ¶
func (c *ServerConfig) InitFromViper(v *viper.Viper) error
InitFromViper initializes the configuration from viper.
func (*ServerConfig) Services ¶ added in v0.0.7
func (c *ServerConfig) Services() []services.ServiceKind
Services returns service kinds.
func (*ServerConfig) ServicesFactories ¶ added in v0.0.7
func (c *ServerConfig) ServicesFactories() map[services.ServiceKind]services.ServiceFactoryProvider
ServicesFactories returns factories.
func (*ServerConfig) Storages ¶ added in v0.0.7
func (c *ServerConfig) Storages() []storage.Kind
Storages returns service kinds.
func (*ServerConfig) StoragesFactories ¶ added in v0.0.7
func (c *ServerConfig) StoragesFactories() map[storage.Kind]storage.FactoryProvider
StoragesFactories returns factories.
type ServerFactory ¶
type ServerFactory struct {
// contains filtered or unexported fields
}
ServerFactory is the configuration for the server factory.
func NewServerFactory ¶
func NewServerFactory(serverCfg *ServerFactoryConfig) (*ServerFactory, error)
NewServerFactory creates the server factory.
func (*ServerFactory) CreateServer ¶
func (f *ServerFactory) CreateServer() (*Server, error)
CreateServer creates a new server.
type ServerFactoryConfig ¶
type ServerFactoryConfig struct {
// contains filtered or unexported fields
}
ServerFactoryConfig holds the configuration for the server factory.
func NewServerFactoryConfig ¶
func NewServerFactoryConfig(initializer servers.ServerInitializer, centralStorageEngine storage.Kind) (*ServerFactoryConfig, error)
NewServerFactoryConfig creates a new server factory configuration.
func (*ServerFactoryConfig) AddFlags ¶
func (c *ServerFactoryConfig) AddFlags(flagSet *flag.FlagSet) error
AddFlags adds flags.
func (*ServerFactoryConfig) InitFromViper ¶
func (c *ServerFactoryConfig) InitFromViper(v *viper.Viper) error
InitFromViper initializes the configuration from viper.