scaler

package
v0.0.0-...-1543d79 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPScaler

type HTTPScaler struct {
	LoadAPIUrl    string
	AddLoadAPIUrl string
	Client        *http.Client
}

HTTPScaler is a scaling system to increase remote api system scale

func (HTTPScaler) AddSystemLoad

func (system HTTPScaler) AddSystemLoad(message string) (*http.Response, error)

AddSystemLoad will increase the systems load by one

func (HTTPScaler) GetSystemLoad

func (system HTTPScaler) GetSystemLoad() (int, error)

GetSystemLoad returns to load count of the running system

func (*HTTPScaler) SetLoadURLs

func (system *HTTPScaler) SetLoadURLs(loadAPIUrl string, addLoadAPIUrl string)

SetLoadURLs sets the load urls for the system

type Response

type Response struct {
	LoadCount int
}

Response is the data that is returned from the API

type System

type System interface {
	GetSystemLoad() (int, error)
	AddSystemLoad(message string) (*http.Response, error)
	SetLoadURLs(loadAPIUrl string, addLoadAPIUrl string)
}

Jump to

Keyboard shortcuts

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