test

package
v0.0.0-...-0ef1e8c Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: GPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	API  = "/api/internal"
	FLOW = "/chf"
	TSDB = "/tsdb"
	DNS  = "/dns"
)

Variables

This section is empty.

Functions

func Print

func Print(out io.Writer, i int, flow chf.CHF, dev *api.Device)

func RandStr

func RandStr(n int) string

Types

type Server

type Server struct {
	Host   net.IP
	Port   int
	Email  string
	Token  string
	Device *api.Device
	Log    *log.Logger
	// contains filtered or unexported fields
}

func NewClientServer

func NewClientServer() (*api.Client, *Server, *api.Device, error)

func NewServer

func NewServer(host string, port int, tls, quiet bool) (*Server, error)

func (*Server) Close

func (s *Server) Close()

func (*Server) Dns

func (s *Server) Dns() <-chan *api.DNSResponse

func (*Server) Flows

func (s *Server) Flows() <-chan chf.PackedCHF

func (*Server) Serve

func (s *Server) Serve(email, token string, dev *api.Device) error

func (*Server) URL

func (s *Server) URL(path string) *url.URL

Jump to

Keyboard shortcuts

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