Documentation ¶
Index ¶
- Variables
- func ParseLabel(args *[]string) (label string)
- func RegisterSource(s Source)
- func SourceExampleUrls() []string
- func Sources() map[string]Source
- type Collector
- func (c *Collector) AddFlags(f ...*flags.Flags)
- func (c *Collector) AddSource(s ...string)
- func (c *Collector) GetDefaultSource() string
- func (c *Collector) Label() string
- func (c *Collector) Labels() []string
- func (c *Collector) Parse(args []string, f ...*flags.Flags) (p *data.Data, remainingArgs []string, err error)
- func (c *Collector) PrintUsage()
- func (c *Collector) SetDefaultSource(s string)
- func (c *Collector) Sources() []string
- type Source
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUnknownScheme = errors.New("source: scheme is unknown")
)
Functions ¶
func ParseLabel ¶
func RegisterSource ¶
func RegisterSource(s Source)
func SourceExampleUrls ¶
func SourceExampleUrls() []string
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
func (*Collector) GetDefaultSource ¶
func (*Collector) PrintUsage ¶
func (c *Collector) PrintUsage()
func (*Collector) SetDefaultSource ¶
type Source ¶
type Source interface { // Return the source scheme, like file or etcd Scheme() string // Return example url with scheme, ie file://config.yml ExampleUrl() string // Gets called after the flags are parsed // Read or load any additional sources here // Return data for label Load(label string, u *url.URL) (*data.Data, error) // Returns all labels Labels() []string }
Click to show internal directories.
Click to hide internal directories.