state

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ServState = &ServerState{}

Functions

func CompareLastNotifyTime

func CompareLastNotifyTime(id int, newTimeStr string) bool

func GetLastNotifyTimeByID

func GetLastNotifyTimeByID(id int) string

func InitializeState

func InitializeState() error

func ParseLineAndSendNotify

func ParseLineAndSendNotify(sid int, line string)

func UpdateLastNotifyTime

func UpdateLastNotifyTime(id int, newTimeStr string) error

Types

type ServerData

type ServerData struct {
	ID             int    `yaml:"id"`
	LastNotifyTime string `yaml:"last_notify_time"`
}

type ServerState

type ServerState struct {
	StateFile *os.File
	FileMutex sync.Mutex
	Srvs      ServersState
}

type ServersState

type ServersState struct {
	Servers []ServerData `yaml:"servers"`
}

Jump to

Keyboard shortcuts

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