servicetest

package
v1.5.9-profiling Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2021 License: MIT Imports: 10 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
}

func NewConfig

func NewConfig() Config

type Service

type Service struct {
	HTTPDService interface {
		AddRoutes([]httpd.Route) error
		DelRoutes([]httpd.Route)
	}
	// contains filtered or unexported fields
}

func NewService

func NewService(c Config) *Service

func (*Service) AddTester

func (s *Service) AddTester(name string, t Tester) error

func (*Service) Close

func (s *Service) Close() error

func (*Service) Open

func (s *Service) Open() error

type ServiceTest

type ServiceTest struct {
	Link    client.Link        `json:"link"`
	Name    string             `json:"name"`
	Options ServiceTestOptions `json:"options"`
}

type ServiceTestList

type ServiceTestList []ServiceTest

func (ServiceTestList) Len

func (l ServiceTestList) Len() int

func (ServiceTestList) Less

func (l ServiceTestList) Less(i, j int) bool

func (ServiceTestList) Swap

func (l ServiceTestList) Swap(i, j int)

type ServiceTestOptions

type ServiceTestOptions interface{}

type ServiceTestResult

type ServiceTestResult struct {
	Success bool   `json:"success"`
	Message string `json:"message"`
}

type ServiceTests

type ServiceTests struct {
	Link     client.Link     `json:"link"`
	Services ServiceTestList `json:"services"`
}

type Tester

type Tester interface {
	// TestOptions returns an object that is in turn passed to Test.
	// User specified data will be JSON encode/decoded to/from the object.
	TestOptions() interface{}
	// Test a service with the provided options.
	Test(options interface{}) error
}

Jump to

Keyboard shortcuts

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