provider

package
v0.0.0-...-07a4714 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServiceProviderSpec

func ServiceProviderSpec(name string, logger glog.Logger, cfg Config) *hub.ServiceSpec

Types

type Config

type Config interface {
	Level() glog.Level
	Caller() bool
	File() string
	MaxSize() int
	MaxAge() int
	MaxBackups() int
	LocalTime() bool
	Compress() bool
}

type DefaultConfig

type DefaultConfig struct {
	Log struct {
		Level      glog.Level `yaml:"level" toml:"level" json:"level" ini:"level"`
		Caller     bool       `yaml:"caller" toml:"caller" json:"caller" ini:"caller"`
		File       string     `yaml:"file" toml:"file" json:"file" ini:"file"`
		MaxSize    int        `yaml:"maxSize" toml:"maxSize" json:"maxSize" ini:"maxSize"`
		MaxAge     int        `yaml:"maxAge" toml:"maxAge" json:"maxAge" ini:"maxAge"`
		MaxBackups int        `yaml:"maxBackups" toml:"maxBackups" json:"maxBackups" ini:"maxBackups"`
		LocalTime  bool       `yaml:"localTime" toml:"localTime" json:"localTime" ini:"localTime"`
		Compress   bool       `yaml:"compress" toml:"compress" json:"compress" ini:"compress"`
	} `yaml:"log" toml:"log" json:"log" ini:"log"`
}

func (*DefaultConfig) Caller

func (c *DefaultConfig) Caller() bool

func (*DefaultConfig) Compress

func (c *DefaultConfig) Compress() bool

func (*DefaultConfig) File

func (c *DefaultConfig) File() string

func (*DefaultConfig) Level

func (c *DefaultConfig) Level() glog.Level

func (*DefaultConfig) LocalTime

func (c *DefaultConfig) LocalTime() bool

func (*DefaultConfig) MaxAge

func (c *DefaultConfig) MaxAge() int

func (*DefaultConfig) MaxBackups

func (c *DefaultConfig) MaxBackups() int

func (*DefaultConfig) MaxSize

func (c *DefaultConfig) MaxSize() int

type Provider

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

func (*Provider) Init

func (h *Provider) Init() error

Jump to

Keyboard shortcuts

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