Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type LogRotation ¶
type LogRotation struct {
// MaxSize is the maximum size in megabytes of the log file before it gets
// rotated. It defaults to 100 megabytes.
MaxSize int `yaml:"maxSize,omitempty" json:"maxSize,omitempty"`
// MaxAge is the maximum number of days to retain old log files based on the
// timestamp encoded in their filename. Note that a day is defined as 24
// hours and may not exactly correspond to calendar days due to daylight
// savings, leap seconds, etc. The default is not to remove old log files
// based on age.
MaxAge int `yaml:"maxAge,omitempty" json:"maxAge,omitempty"`
// MaxBackups is the maximum number of old log files to retain. The default
// is to retain all old log files (though MaxAge may still cause them to get
// deleted.)
MaxBackups int `yaml:"maxBackups,omitempty" json:"maxBackups,omitempty"`
// LocalTime determines if the time used for formatting the timestamps in
// backup files is the computer's local time. The default is to use UTC
// time.
LocalTime bool `yaml:"localTime,omitempty" json:"localTime,omitempty"`
// Compress determines if the rotated log files should be compressed
// using gzip. The default is not to perform compression.
Compress bool `yaml:"compress,omitempty" json:"compress,omitempty"`
}
type Server ¶
type Server struct {
Name string
URL string `yaml:"url"`
Username string `yaml:",omitempty"`
Password string `yaml:",omitempty"`
Interval time.Duration `yaml:",omitempty"`
Timeout time.Duration `yaml:",omitempty"`
AutoSave string `yaml:",omitempty"`
Readonly bool `yaml:",omitempty"`
// contains filtered or unexported fields
}
func CurrentServer ¶
func CurrentServer() *Server
func (*Server) AddEvent ¶
func (s *Server) AddEvent(event ServerEvent)
func (*Server) Events ¶
func (s *Server) Events() []ServerEvent
func (*Server) SetState ¶
func (s *Server) SetState(state ServerState)
func (*Server) State ¶
func (s *Server) State() ServerState
type ServerEvent ¶
type ServerState ¶
type ServerState string
const ( ServerReady ServerState = "ready" ServerError ServerState = "error" )
Click to show internal directories.
Click to hide internal directories.