rule

package
v0.8.6 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Link interface {
	GetID() string
	// GetBytes rx, tx
	GetBytes() (uint64, uint64)
	// GetPackets rx, tx
	GetPackets() (uint64, uint64)
}

Link link interface

type Mgr

type Mgr struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Mgr rule manager

func New

func New() *Mgr

New new rule manager

func (*Mgr) Add

func (mgr *Mgr) Add(rule Rule)

Add add rule

func (*Mgr) Get

func (mgr *Mgr) Get(name, remote string) Rule

Get get rule by name

func (*Mgr) Range

func (mgr *Mgr) Range(fn func(Rule))

Range range rules

type Rule

type Rule interface {
	NewLink(id, remote string, localConn net.Conn, remoteConn *conn.Conn) Link
	GetName() string
	GetRemote() string
	GetPort() uint16
	GetTypeName() string
	GetTarget() string
	GetLinks() []Link
}

Rule rule interface

Directories

Path Synopsis
vnc

Jump to

Keyboard shortcuts

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