services

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2018 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

View Source
const (
	HTTPServerShutdownTimeout = 10 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ExporterService

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

func NewExporterService

func NewExporterService(ctx context.Context, interval int, collectorProvider collectors.ProviderInterface, wg *sync.WaitGroup) *ExporterService

func (*ExporterService) Run

func (es *ExporterService) Run() error

type HTTPServer

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

func (*HTTPServer) ListenAndServe

func (hs *HTTPServer) ListenAndServe() error

func (*HTTPServer) SetAddr

func (hs *HTTPServer) SetAddr(addr string)

func (*HTTPServer) SetContext

func (hs *HTTPServer) SetContext(ctx context.Context)

func (*HTTPServer) SetHandler

func (hs *HTTPServer) SetHandler(handler http.Handler)

type HTTPServerInterface

type HTTPServerInterface interface {
	SetContext(context.Context)
	SetAddr(string)
	SetHandler(http.Handler)
	ListenAndServe() error
}

type MetricsService

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

func NewMetricsService

func NewMetricsService(ctx context.Context, listenAddr string, wg *sync.WaitGroup) *MetricsService

func (*MetricsService) MustRegisterPrometheusCollector

func (ms *MetricsService) MustRegisterPrometheusCollector(cs ...prometheus.Collector)

func (*MetricsService) StartServer

func (ms *MetricsService) StartServer() error

type MockHTTPServerInterface

type MockHTTPServerInterface struct {
	mock.Mock
}

MockHTTPServerInterface is an autogenerated mock type for the HTTPServerInterface type

func (*MockHTTPServerInterface) ListenAndServe

func (_m *MockHTTPServerInterface) ListenAndServe() error

ListenAndServe provides a mock function with given fields:

func (*MockHTTPServerInterface) SetAddr

func (_m *MockHTTPServerInterface) SetAddr(_a0 string)

SetAddr provides a mock function with given fields: _a0

func (*MockHTTPServerInterface) SetContext

func (_m *MockHTTPServerInterface) SetContext(_a0 context.Context)

SetContext provides a mock function with given fields: _a0

func (*MockHTTPServerInterface) SetHandler

func (_m *MockHTTPServerInterface) SetHandler(_a0 http.Handler)

SetHandler provides a mock function with given fields: _a0

Jump to

Keyboard shortcuts

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