client

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start()

Types

type Info

type Info struct {
	ServerName  string    `json:"server_name"`
	PlayerCount int64     `json:"player_count"`
	Players     []*Player `json:"players"`
}

type Player

type Player struct {
	Name     string `json:"name"`
	Duration int64  `json:"duration"`
}

type Server added in v1.0.1

type Server struct {
	DisplayName    string
	Name           string
	Ip             string
	Port           int64
	Interval       int64
	IntervalTicker *time.Ticker
	Remark         string
	Info           *Info
	ViewData       *ViewData
	Container      *fyne.Container
}

func NewServer added in v1.0.1

func NewServer(displayName string, ip string, port int64, interval int64, remark string) *Server

func (*Server) AsyncRefresh added in v1.0.1

func (s *Server) AsyncRefresh()

func (*Server) Start added in v1.0.1

func (s *Server) Start()

func (*Server) UpdateInterval added in v1.0.1

func (s *Server) UpdateInterval(interval int64)

type ServerContainer added in v1.0.1

type ServerContainer struct {
	Servers []*Server
	// contains filtered or unexported fields
}

func GetServerContainer added in v1.0.7

func GetServerContainer() *ServerContainer

func NewServerContainer added in v1.0.1

func NewServerContainer() *ServerContainer

func (*ServerContainer) AddServer added in v1.0.1

func (sc *ServerContainer) AddServer(server *Server)

func (*ServerContainer) GetServers added in v1.0.1

func (sc *ServerContainer) GetServers() []*Server

func (*ServerContainer) RemoveServer added in v1.0.1

func (sc *ServerContainer) RemoveServer(server *Server)

type ViewData added in v1.0.1

type ViewData struct {
	ServerName      binding.String
	PlayerCount     binding.String
	MaxDurationInfo binding.String
	Remark          binding.String
	PlayerInfos     binding.ExternalStringList
}

Jump to

Keyboard shortcuts

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