Documentation ¶
Overview ¶
Package servers implements the components required for the servers.
Index ¶
- func NewCommunityServerInitializer(host azservices.HostKind) (azservers.ServerInitializer, error)
- type CommunityServerInitializer
- func (c *CommunityServerInitializer) GetHost() azservices.HostKind
- func (c *CommunityServerInitializer) GetHostInfo() *azservices.HostInfo
- func (c *CommunityServerInitializer) GetServices() []azservices.ServiceKind
- func (c *CommunityServerInitializer) GetServicesFactories() (map[azservices.ServiceKind]azservices.ServiceFactoryProvider, error)
- func (c *CommunityServerInitializer) GetStorages(centralStorageEngine azstorage.StorageKind, ...) []azstorage.StorageKind
- func (c *CommunityServerInitializer) GetStoragesFactories(centralStorageEngine azstorage.StorageKind, ...) (map[azstorage.StorageKind]azstorage.StorageFactoryProvider, error)
- func (c *CommunityServerInitializer) HasCentralStorage() bool
- func (c *CommunityServerInitializer) HasProximityStorage() bool
- type Server
- type ServerConfig
- func (c *ServerConfig) AddFlags(flagSet *flag.FlagSet) error
- func (c *ServerConfig) GetAppData() string
- func (c *ServerConfig) GetCentralStorageEngine() azstorage.StorageKind
- func (c *ServerConfig) GetHost() azservices.HostKind
- func (c *ServerConfig) GetProximityStorageEngine() azstorage.StorageKind
- func (c *ServerConfig) GetServices() []azservices.ServiceKind
- func (c *ServerConfig) GetServicesFactories() map[azservices.ServiceKind]azservices.ServiceFactoryProvider
- func (c *ServerConfig) GetStorages() []azstorage.StorageKind
- func (c *ServerConfig) GetStoragesFactories() map[azstorage.StorageKind]azstorage.StorageFactoryProvider
- func (c *ServerConfig) InitFromViper(v *viper.Viper) error
- type ServerFactory
- type ServerFactoryConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCommunityServerInitializer ¶
func NewCommunityServerInitializer(host azservices.HostKind) (azservers.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) GetHost ¶
func (c *CommunityServerInitializer) GetHost() azservices.HostKind
GetHost returns the service kind set as host.
func (*CommunityServerInitializer) GetHostInfo ¶
func (c *CommunityServerInitializer) GetHostInfo() *azservices.HostInfo
GetHostInfo returns the infos of the service kind set as host.
func (*CommunityServerInitializer) GetServices ¶
func (c *CommunityServerInitializer) GetServices() []azservices.ServiceKind
GetServices returns the active service kinds.
func (*CommunityServerInitializer) GetServicesFactories ¶
func (c *CommunityServerInitializer) GetServicesFactories() (map[azservices.ServiceKind]azservices.ServiceFactoryProvider, error)
GetServicesFactories returns the service factories providers.
func (*CommunityServerInitializer) GetStorages ¶
func (c *CommunityServerInitializer) GetStorages(centralStorageEngine azstorage.StorageKind, proximityStorageEngine azstorage.StorageKind) []azstorage.StorageKind
GetStorages returns the active storage kinds.
func (*CommunityServerInitializer) GetStoragesFactories ¶
func (c *CommunityServerInitializer) GetStoragesFactories(centralStorageEngine azstorage.StorageKind, proximityStorageEngine azstorage.StorageKind) (map[azstorage.StorageKind]azstorage.StorageFactoryProvider, error)
GetStoragesFactories returns the storage factories providers.
func (*CommunityServerInitializer) HasCentralStorage ¶
func (c *CommunityServerInitializer) HasCentralStorage() bool
HasCentralStorage returns true if a central storage is required.
func (*CommunityServerInitializer) HasProximityStorage ¶
func (c *CommunityServerInitializer) HasProximityStorage() bool
HasProximityStorage returns true if a proximity storage is required.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents the applicative server.
func (*Server) GetHost ¶
func (s *Server) GetHost() azservices.HostKind
GetHost returns the hsot kind.
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) GetAppData ¶
func (c *ServerConfig) GetAppData() string
GetAppData returns the app data.
func (*ServerConfig) GetCentralStorageEngine ¶
func (c *ServerConfig) GetCentralStorageEngine() azstorage.StorageKind
GetCentralStorageEngine returns the central storage engine.
func (*ServerConfig) GetHost ¶
func (c *ServerConfig) GetHost() azservices.HostKind
GetHost returns the host kind.
func (*ServerConfig) GetProximityStorageEngine ¶
func (c *ServerConfig) GetProximityStorageEngine() azstorage.StorageKind
GetProximityStorageEngine returns the proximity storage engine.
func (*ServerConfig) GetServices ¶
func (c *ServerConfig) GetServices() []azservices.ServiceKind
GetServices returns service kinds.
func (*ServerConfig) GetServicesFactories ¶
func (c *ServerConfig) GetServicesFactories() map[azservices.ServiceKind]azservices.ServiceFactoryProvider
GetServicesFactories returns factories.
func (*ServerConfig) GetStorages ¶
func (c *ServerConfig) GetStorages() []azstorage.StorageKind
GetStorages returns service kinds.
func (*ServerConfig) GetStoragesFactories ¶
func (c *ServerConfig) GetStoragesFactories() map[azstorage.StorageKind]azstorage.StorageFactoryProvider
GetStoragesFactories returns factories.
func (*ServerConfig) InitFromViper ¶
func (c *ServerConfig) InitFromViper(v *viper.Viper) error
InitFromViper initializes the configuration from viper.
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 azservers.ServerInitializer, centralStorageEngine azstorage.StorageKind, proximityStorageEngine azstorage.StorageKind) (*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.