Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server interface { // Start starts up the gotosocial server. If something goes wrong // while starting the server, then an error will be returned. Start(context.Context) error // Stop closes down the gotosocial server, first closing the router // then the database. If something goes wrong while stopping, an // error will be returned. Stop(context.Context) error }
Server is the 'main' function of the gotosocial server, and the place where everything hangs together. The logic of stopping and starting the entire server is contained here.
func NewServer ¶
func NewServer(db db.DB, apiRouter router.Router, federator federation.Federator, mediaManager media.Manager) (Server, error)
NewServer returns a new gotosocial server, initialized with the given configuration. An error will be returned the caller if something goes wrong during initialization eg., no db or storage connection, port for router already in use, etc.
Click to show internal directories.
Click to hide internal directories.