classification

package
v0.0.0-...-f1d3745 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package protocol reads the /etc/protocol file and builds up a map[uint8]string. uint8 is used as that is what is present in the unified2 records.

Entries of the classification file are of the format:

# comments are ok
config classification:shortname,short description,priority

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFile

func ReadFile(file string) (<-chan ClassMap, <-chan error)

Asynchronously read classification file, the result/errors are returned over channels. The caller should use a select statement.

Types

type ClassMap

type ClassMap map[uint32]*Classification

Map of classifications into their meanings. The key is taken from the position in the file.

type Classification

type Classification struct {
	Name        string
	Description string
	Priority    uint32
}

Representation of a line in the config file

Jump to

Keyboard shortcuts

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