aspects

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2015 License: MIT Imports: 2 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aspect

type Aspect interface {
	//GetStats returns any marchable object with the stats
	GetStats() interface{}
	//Name returns the name of the Aspect
	Name() string
	//InRoot returns a bool, if `true` this aspect will be used at `/`
	InRoot() bool
}

type MemoryAspect

type MemoryAspect struct {
	ShowInRoot bool
}

func NewMemoryAspect

func NewMemoryAspect(inRoot bool) *MemoryAspect

NewMemoryAspect returns the value of `runtime.ReadMemStats`

func (*MemoryAspect) GetStats

func (a *MemoryAspect) GetStats() interface{}

func (*MemoryAspect) InRoot

func (a *MemoryAspect) InRoot() bool

func (*MemoryAspect) Name

func (a *MemoryAspect) Name() string

type RuntimeAspect

type RuntimeAspect struct {
	ShowInRoot bool
}

func NewRuntimeAspect

func NewRuntimeAspect(inRoot bool) *RuntimeAspect

NewRuntimeAspect returns several values from the runtome

func (*RuntimeAspect) GetStats

func (a *RuntimeAspect) GetStats() interface{}

func (*RuntimeAspect) InRoot

func (a *RuntimeAspect) InRoot() bool

func (*RuntimeAspect) Name

func (a *RuntimeAspect) Name() string

type RuntimeAspectData

type RuntimeAspectData struct {
	GoVersion    string
	GoOs         string
	GoArch       string
	CpuNum       int
	GoroutineNum int
	Gomaxprocs   int
	CgoCallNum   int64
}

type TimeAspect

type TimeAspect struct {
	StartTime  time.Time
	ShowInRoot bool
}

func NewTimeAspect

func NewTimeAspect(inRoot bool) *TimeAspect

NewTimeAspect returns the current time and the running time

func (*TimeAspect) GetStats

func (a *TimeAspect) GetStats() interface{}

func (*TimeAspect) InRoot

func (a *TimeAspect) InRoot() bool

func (*TimeAspect) Name

func (a *TimeAspect) Name() string

type TimeAspectData

type TimeAspectData struct {
	StartTime   time.Time
	RequestTime time.Time
}

Jump to

Keyboard shortcuts

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