fabric: github.com/hyperledger/fabric/common/metrics/gendoc Index | Files

package gendoc

import "github.com/hyperledger/fabric/common/metrics/gendoc"

Index

Package Files

options.go table.go

func FileOptions Uses

func FileOptions(f *ast.File) ([]interface{}, error)

FileOptions walks the specified ast.File for options structs used when creating metrics and returns instances that are recreated from the source.

func Options Uses

func Options(pkgs []*packages.Package) ([]interface{}, error)

Options scans the provided list of packages for options structs used when creating metrics and returns instances that are recreated from the source tree.

type Cell Uses

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

func (Cell) BucketFormat Uses

func (c Cell) BucketFormat() string

func (Cell) Description Uses

func (c Cell) Description() string

func (Cell) Field Uses

func (c Cell) Field(f Field) string

func (Cell) Labels Uses

func (c Cell) Labels() string

func (Cell) Name Uses

func (c Cell) Name() string

func (Cell) Type Uses

func (c Cell) Type() string

type Cells Uses

type Cells []Cell

func NewCells Uses

func NewCells(options []interface{}) (Cells, error)

NewCells transforms metrics options to cells that can be used for doc generation.

func (Cells) Len Uses

func (c Cells) Len() int

func (Cells) Less Uses

func (c Cells) Less(i, j int) bool

func (Cells) MaxLen Uses

func (c Cells) MaxLen(f Field) int

func (Cells) Swap Uses

func (c Cells) Swap(i, j int)

type Column Uses

type Column struct {
    Field Field
    Name  string
    Split int
    Width int
}

A Column represents a column of data in the reference table.

type Field Uses

type Field uint8

A Field represents data that is included in the reference table for metrics.

const (
    Name        Field = iota // Name is the meter name.
    Type                     // Type is the type of meter option.
    Description              // Description is the help text from the meter option.
    Labels                   // Labels is the meter's label information.
    Bucket                   // Bucket is the statsd bucket format
)

type Table Uses

type Table struct {
    Columns []Column
    Cells   Cells
}

A Table maintains the cells and columns used to generate the restructured text formatted reference documentation.

func NewPrometheusTable Uses

func NewPrometheusTable(cells Cells) Table

NewPrometheusTable creates a table that can be used to document Prometheus metrics maintained by Fabric.

func NewStatsdTable Uses

func NewStatsdTable(cells Cells) Table

NewStatsdTable creates a table that can be used to document StatsD metrics maintained by Fabric.

func (Table) Generate Uses

func (t Table) Generate(w io.Writer)

Generate generates a restructured text formatted table from the cells and columns contained in the table.

Package gendoc imports 12 packages (graph). Updated 2019-11-19. Refresh now. Tools for package owners.