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) DBStats() (defaultDBStats *gosql.DBStats, processStorageDBStats *gosql.DBStats)
- func (s *Server) DefaultDBStats() *gosql.DBStats
- func (s *Server) GetEnvelopeStorage() storage.EnvelopeStorage
- func (s *Server) GetRavenClient() *raven.Client
- 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) ProcessStorageDBStats() *gosql.DBStats
- func (s *Server) SetEnvelopeStorageDB(m *model.Model, db *yago.DB)
- func (s *Server) SetLogger(logger xbus.Logger)
- func (s *Server) SetRavenTransport(transport raven.Transport) error
- func (s *Server) SetSQLDB(m *model.Model, db *yago.DB)
- func (s *Server) SetupRaven() error
- 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 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 SentryDSN string SentryEnvironment string MetricsHTTPHost string MetricsHTTPPort int }
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) DBStats ¶
DBStats returns the Stats of the two database connexions, with a cache of 10ms
func (*Server) DefaultDBStats ¶
DefaultDBStats returns the Stats of the default database
func (*Server) GetEnvelopeStorage ¶
func (s *Server) GetEnvelopeStorage() storage.EnvelopeStorage
GetEnvelopeStorage returns the envelope storage
func (*Server) GetRavenClient ¶
GetRavenClient returns the raven.Client 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) ProcessStorageDBStats ¶
ProcessStorageDBStats returns the Stats of the process storage database
func (*Server) SetEnvelopeStorageDB ¶
SetEnvelopeStorageDB sets the model & db for the envelope storage
func (*Server) SetRavenTransport ¶
SetRavenTransport forces a transport on the raven client and creates a client even if no SentryDSN is set
func (*Server) SetupRaven ¶
SetupRaven configures the raven client