Documentation ¶
Index ¶
- Variables
- type ErrDBNeedUpgrade
- type InstanceProperties
- type Options
- type Server
- func (s *Server) AccountStorage() storage.AccountStorage
- func (s *Server) ActorStorage() storage.ActorStorage
- func (s *Server) CertNATSUrls() []string
- func (s *Server) GetEnvelopeStorage() storage.EnvelopeStorage
- func (s *Server) GetSentryHub() *sentry.Hub
- func (s *Server) NATSConnectOptions() nats.Options
- func (s *Server) NATSUrl() string
- func (s *Server) PasswordStorage() storage.PasswordStorage
- func (s *Server) ProcessManager() *process.Manager
- func (s *Server) ProcessStorage() storage.ProcessStorage
- func (s *Server) SetEnvelopeStorageDB(m *model.Model, db *yago.DB)
- func (s *Server) SetLogger(logger xbus.ZeroLogger)
- func (s *Server) SetSQLDB(m *model.Model, db *yago.DB)
- func (s *Server) Shutdown()
- func (s *Server) StartNATS() error
- func (s *Server) Startup() (err error)
- func (s *Server) StopNATS()
Constants ¶
This section is empty.
Variables ¶
var ErrDBNotInitialized = errors.New(
"Database is not initialized. Run 'xbusd init'",
)
ErrDBNotInitialized is when the database was never initialized
var ErrDBNotVersionned = errors.New(
"database is not versioned. " +
"Apply manually the migration scripts up to version 3.0.0-beta.14, " +
"then run 'xbusd migrate'")
ErrDBNotVersionned is returned by checkDBVersion if the database contains some tables but is not versionned, which means it was created before version 3.0.0-beta.14
Functions ¶
This section is empty.
Types ¶
type ErrDBNeedUpgrade ¶
ErrDBNeedUpgrade is returned if the database is not up-to-date with the server version
func (ErrDBNeedUpgrade) Error ¶
func (e ErrDBNeedUpgrade) Error() string
Error returns the formatted error message
type InstanceProperties ¶
InstanceProperties contains the description of a xbus instance
type Options ¶
type Options struct { Instance InstanceProperties DatabaseDSN string DatabaseLogFlags qb.LogFlags DatabaseMaxConnections int ProcessStorageDBMaxConnections int RootCA string // a PEM or a path to a PEM file ServerCert string // a PEM or a path to a PEM file ServerKey string // a PEM or a path to a PEM file ClientCA string // a PEM or a path to a PEM file ClientCAKey string // a PEM or a path to a PEM file TLSTimeout float64 NATSHost string NATSPort int NATSDebug bool NATSTrace bool StorageEnvelopeCache bool StorageEnvelopeCacheMaxSize int64 StorageEnvelopeImpl string StorageEnvelopeFallback string ServeNATS bool ServeBroker bool ServeClientAPI bool ServeDirector bool ServeEnvelopeStorage bool ServeControl bool ServeMetrics bool ServePostmortem bool ServeProcessState bool ServeRegistration bool ServeSentinel bool GnatsdOptions gnatsd.Options Sentry *sentry.Hub Logger xbus.ZeroLogger MetricsHTTPHost string MetricsHTTPPort int MetricsMergeGlobal bool MetricsDelayHint time.Duration ServiceSentinel sentinel.Settings }
Options of a server
type Server ¶
Server the XBus server
func (*Server) AccountStorage ¶
func (s *Server) AccountStorage() storage.AccountStorage
AccountStorage returns the underlying AccountStorage
func (*Server) ActorStorage ¶
func (s *Server) ActorStorage() storage.ActorStorage
ActorStorage returns the underlying ActorStorage
func (*Server) CertNATSUrls ¶
CertNATSUrls returns the nats server url based on the certificate SANs
func (*Server) GetEnvelopeStorage ¶
func (s *Server) GetEnvelopeStorage() storage.EnvelopeStorage
GetEnvelopeStorage returns the envelope storage
func (*Server) GetSentryHub ¶
func (s *Server) GetSentryHub() *sentry.Hub
GetSentryHub returns the sentry.Hub instance
func (*Server) NATSConnectOptions ¶
NATSConnectOptions returns nats.Options to connect to the bus with full access
func (*Server) PasswordStorage ¶
func (s *Server) PasswordStorage() storage.PasswordStorage
PasswordStorage returns the underlying PasswordStorage
func (*Server) ProcessManager ¶
ProcessManager returns the process manager
func (*Server) ProcessStorage ¶
func (s *Server) ProcessStorage() storage.ProcessStorage
ProcessStorage returns the underlying ProcessStorage
func (*Server) SetEnvelopeStorageDB ¶
SetEnvelopeStorageDB sets the model & db for the envelope storage
func (*Server) SetLogger ¶
func (s *Server) SetLogger(logger xbus.ZeroLogger)
SetLogger changes the logger used by server