agent

package
v0.0.0-...-ea80a81 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Agent

func Agent(db *sql.DB)

func Counter

func Counter(expression []string, operationTime TimeLimitStruct, answerCh chan int)

func GetExpression

func GetExpression(db *sql.DB) (bool, []string, int, int, string, bool)

func SendPing

func SendPing(db *sql.DB)

func StartCountingAndGetResult

func StartCountingAndGetResult(limits TimeLimitStruct, db *sql.DB)

Types

type ExpressionForCount

type ExpressionForCount struct {
	ID         int
	MainID     int
	Variable   string
	N1         string
	N2         string
	Operation  string
	Answer     any
	Processing bool
	Last       bool
}

type Server

type Server struct {
	ID          int
	NextPing    string
	ServerState int
}

type TimeLimitStruct

type TimeLimitStruct struct {
	TimeAdd  int
	TimeSub  int
	TimeMult int
	TimeDiv  int
	LifeTime int
}

Jump to

Keyboard shortcuts

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