server

package
v0.0.0-...-5f33b41 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const SupportedWebhookVersion = "4"

SupportedWebhookVersion is the alert webhook data version that is supported by this app

Variables

This section is empty.

Functions

func Load

func Load(filename string) (internal.Configuration, error)

Load loads the configuration from the provided file

Types

type Args

type Args struct {
	MetricsPath    string
	Address        string
	ConfigFilename string

	Messenger   internal.Messenger
	Concurrency int
}

Args are the arguments for building a new server

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server represents a web server that processes webhooks

func New

func New(args Args) *Server

New returns a new web server, or fails misserably

func (*Server) LoadConfiguration

func (s *Server) LoadConfiguration() error

LoadConfiguration reloads the configuration file

func (*Server) Start

func (s *Server) Start()

Start starts a new server on the given address

Jump to

Keyboard shortcuts

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