Documentation ¶
Index ¶
- Constants
- func IsDrySuffix(file string) bool
- func MergeCodes(codes []string) string
- func ParseEnvDuration(name string, defaultValue time.Duration) time.Duration
- func ReadFile(f *os.File) ([]byte, error)
- func TrimDrySuffix(file string) string
- type Features
- type Float64
- type GoroutineIncr
- type JSONLogFile
- type SizeUnit
- type WidthHeight
Constants ¶
View Source
const ( KILO SizeUnit = 1000 MEGA = 1000 * KILO GIGA = 1000 * MEGA )
View Source
const ( DrySuffix = ":dry" GzSuffix = ".gz" )
Variables ¶
This section is empty.
Functions ¶
func IsDrySuffix ¶
func MergeCodes ¶
func ParseEnvDuration ¶
func ReadFile ¶
ReadFile reads the named file and returns the contents. A successful call returns err == nil, not err == EOF. Because ReadFile reads the whole file, it does not treat an EOF from Read as an error to be reported.
func TrimDrySuffix ¶
Types ¶
type Features ¶
Features defines a feature map.
func NewFeatures ¶
type Float64 ¶
type Float64 float64
func BytesToGiga ¶
func BytesToMEGA ¶
func (Float64) MarshalJSON ¶
type GoroutineIncr ¶
func ParseGoIncr ¶
func ParseGoIncr(s string) GoroutineIncr
ParseGoIncr parse a GoIncr expressions like: 1. (empty) => GoroutineIncr{} 2. 0 => GoroutineIncr{} 3. 1 => GoroutineIncr{Up: 1} 4. 1:10s => GoroutineIncr{Up: 1, Dur:10s} 5. 1:10s:1 => GoroutineIncr{Up: 1, Dur:10s, Down:1}
func (GoroutineIncr) IsEmpty ¶
func (i GoroutineIncr) IsEmpty() bool
func (GoroutineIncr) Modifier ¶
func (i GoroutineIncr) Modifier() string
type JSONLogFile ¶
func NewJsonLogFile ¶
func NewJsonLogFile(file string) *JSONLogFile
func (*JSONLogFile) Close ¶
func (f *JSONLogFile) Close() error
func (JSONLogFile) IsDry ¶
func (f JSONLogFile) IsDry() bool
func (JSONLogFile) ReadAll ¶
func (f JSONLogFile) ReadAll() []byte
func (*JSONLogFile) WriteJSON ¶
func (f *JSONLogFile) WriteJSON(data []byte) error
type WidthHeight ¶
type WidthHeight struct {
W, H int
}
func ParseWidthHeight ¶
func ParseWidthHeight(val string, defaultWidth, defaultHeight int) WidthHeight
func (WidthHeight) HeightPx ¶
func (h WidthHeight) HeightPx() string
func (WidthHeight) WidthPx ¶
func (h WidthHeight) WidthPx() string
Click to show internal directories.
Click to hide internal directories.