server

package module
v0.0.0-...-a950f81 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2018 License: BSD-3-Clause Imports: 21 Imported by: 0

README

server

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

func FindAlerts

func FindAlerts(conn *nats.Conn, filter utils.Filter) ([]db.Alert, error)

func FindWithAlertAndClient

func FindWithAlertAndClient(conn *nats.Conn, alert, client bson.ObjectId) (*db.Alert, error)

func GenerateRandomKey

func GenerateRandomKey(length int) []byte

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

func GenerateRandomString(len int) string

GenerateRandomKey is a wrapper over securecookie.GenerateRandomKey to generate a string rather then a byte slice

func Handshake

func Handshake(conn net.Conn) (bool, error)

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

func Start

func Start()

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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