server

package
v0.14.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Listen    string // http server listen address. required
	ACL       string // acl json file path. required
	Buf       uint64 // pipe buffer size, default is 1472. optional
	AdminKey  string // admin api authenticate key. optional
	DebugMode bool   // optional
}

type TohServer

type TohServer struct {
	// contains filtered or unexported fields
}

func NewTohServer

func NewTohServer(options Options) (*TohServer, error)

func (*TohServer) Run

func (s *TohServer) Run()

func (*TohServer) Shutdown added in v0.12.4

func (s *TohServer) Shutdown(ctx context.Context) error

type TrafficEvent

type TrafficEvent struct {
	Key, ClientIP, RemoteAddr, Network string
	In, Out                            int64
}

type TrafficEventConsumer

type TrafficEventConsumer func(e *TrafficEvent)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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