classifyqueue

package
v0.0.0-...-dd22d64 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package classifyqueue provides a classification queue.

This package is a work in progress and makes no API stability promises.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dispatcher

type Dispatcher func([]*tlsutil.ConnectionData, []tlsutil.ClassifyResponse)

Dispatcher function for process classification responses.

type Manager

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

Manager implements an async classification service.

func New

func New(c tlsutil.Classifier, opt ...Option) *Manager

New returns a new classify manager.

func (*Manager) Close

func (m *Manager) Close() error

Close manager.

func (*Manager) PushConnection

func (m *Manager) PushConnection(req *tlsutil.ConnectionData) error

PushConnection add a new connection in the classification queue.

func (*Manager) SetConnectionDispatcher

func (m *Manager) SetConnectionDispatcher(d Dispatcher)

SetConnectionDispatcher to dispatch connection classify responses.

type Option

type Option func(*options)

Option encapsules options for manager.

func SetInterval

func SetInterval(d time.Duration) Option

SetInterval option allows change interval.

func SetLogger

func SetLogger(l yalogi.Logger) Option

SetLogger option allows set a custom logger.

func SetQueueSize

func SetQueueSize(i int) Option

SetQueueSize option allows change classification queue size.

Jump to

Keyboard shortcuts

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