Documentation ¶
Index ¶
- func Close()
- func FindAlerts(conn *nats.Conn, filter utils.Filter) ([]db.Alert, error)
- func FindWithAlertAndClient(conn *nats.Conn, alert, client bson.ObjectId) (*db.Alert, error)
- func GenerateRandomKey(length int) []byte
- func GenerateRandomString(len int) string
- func Handshake(conn net.Conn) (bool, error)
- func Loop(conn *nats.Conn)
- func ReadConfig()
- func Start()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindWithAlertAndClient ¶
func GenerateRandomKey ¶
GenerateRandomKey creates a random key with the given length in bytes. On failure, returns nil.
Callers should explicitly check for the possibility of a nil return, treat it as a failure of the system random number generator, and not continue.
func GenerateRandomString ¶
GenerateRandomKey is a wrapper over securecookie.GenerateRandomKey to generate a string rather then a byte slice
func Loop ¶
func Loop(conn *nats.Conn)
Loop is the function for the timer, it will continiously loop all the clients and check if its time for a check
func ReadConfig ¶
func ReadConfig()
ReadConfig will try to find the config and read, if config file does not exists it will create one with default options
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.