Documentation ¶
Overview ¶
Package protover implements types for protocol version strings.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ClientRequired = SupportedProtocols{ Cons: {NewVersionRange(1, 2)}, Desc: {NewVersionRange(1, 2)}, DirCache: {SingleVersion(1)}, HSDir: {SingleVersion(2)}, HSIntro: {SingleVersion(3)}, HSRend: {SingleVersion(1)}, Link: {SingleVersion(4)}, LinkAuth: {SingleVersion(1)}, Microdesc: {NewVersionRange(1, 2)}, Relay: {SingleVersion(2)}, } ClientRecommended = ClientRequired RelayRequired = SupportedProtocols{ Cons: {SingleVersion(1)}, Desc: {SingleVersion(1)}, DirCache: {SingleVersion(1)}, HSDir: {SingleVersion(2)}, HSIntro: {SingleVersion(3)}, HSRend: {SingleVersion(1)}, Link: {NewVersionRange(3, 4)}, LinkAuth: {SingleVersion(1)}, Microdesc: {SingleVersion(1)}, Relay: {NewVersionRange(1, 2)}, } RelayRecommended = ClientRecommended )
Expectations for client and relay implementations.
Functions ¶
This section is empty.
Types ¶
type ProtocolName ¶
type ProtocolName string
ProtocolName is the name for a subset of the Tor protocol.
const ( Link ProtocolName = "Link" LinkAuth ProtocolName = "LinkAuth" Relay ProtocolName = "Relay" DirCache ProtocolName = "DirCache" HSDir ProtocolName = "HSDir" HSIntro ProtocolName = "HSIntro" HSRend ProtocolName = "HSRend" Desc ProtocolName = "Desc" Microdesc ProtocolName = "Microdesc" Cons ProtocolName = "Cons" )
Recognized protocol names.
type SupportedProtocols ¶
type SupportedProtocols map[ProtocolName][]VersionRange
func New ¶
func New() SupportedProtocols
func (SupportedProtocols) String ¶
func (s SupportedProtocols) String() string
func (SupportedProtocols) Strings ¶
func (s SupportedProtocols) Strings() []string
func (SupportedProtocols) Supports ¶
func (s SupportedProtocols) Supports(n ProtocolName, v VersionRange)
type VersionRange ¶
type VersionRange struct {
// contains filtered or unexported fields
}
func NewVersionRange ¶
func NewVersionRange(l, h int) VersionRange
func SingleVersion ¶
func SingleVersion(v int) VersionRange
func (VersionRange) String ¶
func (v VersionRange) String() string
Click to show internal directories.
Click to hide internal directories.