rfc: github.com/juju/rfc/rfc5424/sdelements Index | Files

package sdelements

import "github.com/juju/rfc/rfc5424/sdelements"

The sdelements package holds the implementations of the different RFC 5424 structured data elements.

Index

Package Files

doc.go origin.go private.go

type Origin Uses

type Origin struct {
    // IPs lists extra IP addresses (in addition to the hostname).
    IPs []net.IP // RFC 1035/4291

    // EnterpriseID is the IANA-registered PEN (or sub-code) associated
    // with the identified software.
    EnterpriseID OriginEnterpriseID // RFC 2578

    // SoftwareName identifies the software that originated the record.
    SoftwareName string

    // SoftwareVersion is the software's version.
    SoftwareVersion version.Number
}

Origin is an IANA-registered structured data element that provides extra information about where a log message came from.

See https://tools.ietf.org/html/rfc5424#section-7.2.

func (Origin) ID Uses

func (origin Origin) ID() rfc5424.StructuredDataName

ID returns the SD-ID for this element.

func (Origin) Params Uses

func (origin Origin) Params() []rfc5424.StructuredDataParam

Params returns the []SD-PARAM for this element.

func (Origin) Validate Uses

func (origin Origin) Validate() error

Validate ensures that the element is correct.

type OriginEnterpriseID Uses

type OriginEnterpriseID struct {
    // Number is the PEN.
    Number PrivateEnterpriseNumber

    // SubTree is the path on the subtree from the PEN. The sub-tree
    // should be registered with the IANA.
    SubTree []int
}

OriginEnterpriseID is the PEN (or subtree) for the origin software.

func (OriginEnterpriseID) String Uses

func (eid OriginEnterpriseID) String() string

String returns the string representation of the ID.

func (OriginEnterpriseID) Validate Uses

func (eid OriginEnterpriseID) Validate() error

Validate ensures that the ID is correct.

type Private Uses

type Private struct {
    // Name is the custom name for this SD element, relative to PEN.
    Name rfc5424.StructuredDataName

    // PEN is the IANA-registered Private Enterprise Number, with an
    // implicit SMI Network Management code prefixed by
    // "iso.org.dod.internet.private.enterprise".
    PEN PrivateEnterpriseNumber

    // Data is the multi-set of data items associated with this SD
    // element. The PEN's org should ensure that the format is
    // sufficiently well-communicated.
    Data []rfc5424.StructuredDataParam
}

Private is a custom structured data element associated with an IANA-registered Private Enterprise Number.

See https://tools.ietf.org/html/rfc5424#section-6.3.1 and http://www.iana.org/assignments/smi-numbers/smi-numbers.xhtml.

func (Private) ID Uses

func (sde Private) ID() rfc5424.StructuredDataName

ID returns the SD-ID for this element.

func (Private) Params Uses

func (sde Private) Params() []rfc5424.StructuredDataParam

Params returns the []SD-PARAM for this element.

func (Private) Validate Uses

func (sde Private) Validate() error

Validate ensures that the element is correct.

type PrivateEnterpriseNumber Uses

type PrivateEnterpriseNumber int

PrivateEnterpriseNumber is an IANA-registered positive integer that publicly identifies a specific organization.

See http://www.iana.org/assignments/smi-numbers/smi-numbers.xhtml.

func (PrivateEnterpriseNumber) String Uses

func (pen PrivateEnterpriseNumber) String() string

String returns the string representation of the PEN.

func (PrivateEnterpriseNumber) Validate Uses

func (pen PrivateEnterpriseNumber) Validate() error

Validate ensures that the number is correct.

Package sdelements imports 7 packages (graph) and is imported by 20 packages. Updated 2018-05-18. Refresh now. Tools for package owners.