Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDatabase ¶
GetDatabase returns the Atomix database
func RegisterService ¶ added in v0.6.5
RegisterService registers a service with the Atomix cluster
Types ¶
type Config ¶
type Config struct { // Controller is the Atomix controller address Controller string `yaml:"controller,omitempty"` // Member is the Atomix member name Member string `yaml:"member,omitempty"` // Host is the Atomix member hostname Host string `yaml:"host,omitempty"` // Port is the Atomix member port Port int `yaml:"port,omitempty"` // Namespace is the Atomix namespace Namespace string `yaml:"namespace,omitempty"` // Scope is the Atomix client/application scope Scope string `yaml:"scope,omitempty"` // Databases is a mapping of database types to databases Databases map[DatabaseType]string `yaml:"databases"` }
Config is the Atomix configuration
func (Config) GetController ¶
GetController gets the Atomix controller address
func (Config) GetDatabase ¶
func (c Config) GetDatabase(databaseType DatabaseType) string
GetDatabase gets the database name for the given database type
func (Config) GetNamespace ¶
GetNamespace gets the Atomix client namespace
type DatabaseType ¶
type DatabaseType string
DatabaseType is the type of a database
const ( // DatabaseTypeConsensus indicates a consensus database DatabaseTypeConsensus DatabaseType = "consensus" // DatabaseTypeCache indicates a cache database DatabaseTypeCache DatabaseType = "cache" // DatabaseTypeEvent indicates an event database DatabaseTypeEvent DatabaseType = "event" // DatabaseTypeConfig indicates a configuration database // Deprecated: Use DatabaseTypeConsensus instead DatabaseTypeConfig DatabaseType = "config" // DatabaseTypeTimeSeries indicates a time series database // Deprecated: Use DatabaseTypeEvent instead DatabaseTypeTimeSeries DatabaseType = "timeSeries" // DatabaseTypeRelational indicates a relational database // Deprecated: Use DatabaseTypeConfig or DatabaseTypeCache instead DatabaseTypeRelational DatabaseType = "relational" )
type ServiceRegistry ¶ added in v0.6.5
type ServiceRegistry struct {
// contains filtered or unexported fields
}
ServiceRegistry is a registry of Atomix services
func (*ServiceRegistry) Register ¶ added in v0.6.5
func (r *ServiceRegistry) Register(service cluster.Service)
Register registers a service
Click to show internal directories.
Click to hide internal directories.