httpd

package
v0.0.0-...-4471eec Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2015 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter() *gin.Engine

Types

type Config

type Config struct {
	Enabled        bool   `toml:"enabled"`
	BindAddress    string `toml:"bind-address"`
	BaseApiURL     string `toml:"base-api-url"`
	MaxConnections int    `toml:"max-connections"`
	AuthEnabled    bool   `toml:"auth-enabled"`
	LogEnabled     bool   `toml:"log-enabled"`
	WriteTracing   bool   `toml:"write-tracing"`
	PprofEnabled   bool   `toml:"pprof-enabled"`
}

func NewConfig

func NewConfig() Config

type Service

type Service struct {
	Version string

	PingController          *controllers.PingController
	SessionController       *controllers.SessionController
	UsersController         *controllers.UsersController
	DevicesController       *controllers.DevicesController
	OrganizationsController *controllers.OrganizationsController
	ConversationsController *controllers.ConversationsController
	MessagesController      *controllers.MessagesController

	Logger *log.Logger
	// contains filtered or unexported fields
}

Service manages the listener and handler for an HTTP endpoint.

func NewService

func NewService(c Config) *Service

NewService returns a new instance of Service.

func (*Service) Addr

func (s *Service) Addr() net.Addr

Addr returns the listener's address. Returns nil if listener is closed.

func (*Service) Close

func (s *Service) Close() error

Close closes the underlying listener.

func (*Service) Err

func (s *Service) Err() <-chan error

Err returns a channel for fatal errors that occur on the listener.

func (*Service) Open

func (s *Service) Open() error

Open starts the service

func (*Service) SetDataStore

func (s *Service) SetDataStore(dataStore *db.Store)

func (*Service) SetLogger

func (s *Service) SetLogger(l *log.Logger)

SetLogger sets the internal logger to the logger passed in.

func (*Service) SetMessagesWriter

func (s *Service) SetMessagesWriter(writer *cluster.MessagesWriter)

func (*Service) SetMetaStore

func (s *Service) SetMetaStore(metaStore *meta.Store)

func (*Service) SetQueryExecutor

func (s *Service) SetQueryExecutor(executor *db.QueryExecutor)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL