servers

package
v0.0.0-...-f2c37c8 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Key        string `json:"key"`
	Protocol   string `json:"protocol"`
	Addr       string `json:"addr"`
	Port       string `json:"port"`
	WorkerPort string `json:"worker_port"`
}

type ServerHealthStatus

type ServerHealthStatus struct {
	Server Server                            `json:"server"`
	Health MUXworkerStructs.ServerStatusJSON `json:"health"`
	Online bool                              `json:"online"`
}

type ServerManager

type ServerManager struct {
	RedisOptions *redis.Options
	// contains filtered or unexported fields
}

func (*ServerManager) AddServer

func (sm *ServerManager) AddServer(s *Server) error

func (*ServerManager) GetLowestLoadedServer

func (sm *ServerManager) GetLowestLoadedServer() *Server

func (*ServerManager) GetServerByIndex

func (sm *ServerManager) GetServerByIndex(index int) *Server

func (*ServerManager) GetServerHealth

func (sm *ServerManager) GetServerHealth(s Server, endpoint string) (MUXworkerStructs.ServerStatusJSON, error)

func (*ServerManager) GetServers

func (sm *ServerManager) GetServers() []*Server

func (*ServerManager) GetServersCount

func (sm *ServerManager) GetServersCount() int

func (*ServerManager) GetServersWithHealth

func (sm *ServerManager) GetServersWithHealth() []ServerHealthStatus

func (*ServerManager) InitTestServers

func (sm *ServerManager) InitTestServers()

func (*ServerManager) LoadServers

func (sm *ServerManager) LoadServers() error

func (*ServerManager) RemoveServer

func (sm *ServerManager) RemoveServer(key string)

Jump to

Keyboard shortcuts

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