gotosocial

package
v0.6.0-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳