httphandler

package
v0.0.0-...-b4c7aa1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPHandler

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

HTTPHandler to handle all http requests

func NewHTTPHandler

func NewHTTPHandler() HTTPHandler

NewHTTPHandler creates new instance of HTTPHandler

func (*HTTPHandler) GetConfigHandlerFunc

func (h *HTTPHandler) GetConfigHandlerFunc(w http.ResponseWriter, r *http.Request)

GetConfigHandlerFunc gives random config file name

func (*HTTPHandler) ReplicaHandler

func (h *HTTPHandler) ReplicaHandler(w http.ResponseWriter, r *http.Request)

func (*HTTPHandler) ResetHandlerFunc

func (h *HTTPHandler) ResetHandlerFunc(w http.ResponseWriter, r *http.Request)

ResetHandlerFunc handles request for resetting ip

func (*HTTPHandler) WsHandler

func (h *HTTPHandler) WsHandler(w http.ResponseWriter, r *http.Request)

WsHandler allows websocket to connect to controller to listen to update

type KubernetesAPI

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

KubernetesAPI communicates to kubernetes api

func NewKubernetesAPI

func NewKubernetesAPI() KubernetesAPI

NewKubernetesAPI creates new instance that communicate to kubernetesAPI

func (*KubernetesAPI) UpdateReplicaAmount

func (k *KubernetesAPI) UpdateReplicaAmount(amount int)

UpdateReplicaAmount updates amount of replicas of executor

type Settings

type Settings struct {
	VpnPriorities         []string `json:"vpnPriorities"`
	TimeBetweenContainers int64    `json:"timeBetweenContainers"`
	MaxPingTime           int      `json:"maxPingTime"`
	PageReloadTime        int      `json:"pageReloadTime"`
	LinkToGo              string   `json:"linkToGo"`
	MaxDownloadSpeed      int      `json:"maxDownloadSpeed"`
	MaxUploadSpeed        int      `json:"maxUploadSpeed"`
	IpLookupLink          string   `json:"ipLookupLink"`
}

Settings store all settings from settings.json

func NewSettings

func NewSettings() Settings

type VPNConfig

type VPNConfig struct {
	VPNSelector  string `json:"vpnSelector"`
	PasswordFile string `json:"passFile"`
}

type VPNSettings

type VPNSettings struct {
	VpnConfigs []VPNConfig `json:"settings"`
}

Settings store all settings from vpn-settings.json

func NewVPNSettings

func NewVPNSettings() VPNSettings

Jump to

Keyboard shortcuts

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