Documentation ¶
Index ¶
- Variables
- type App
- type AppLifeCycleAware
- type AppSlots
- type BaseApp
- type BaseService
- type Bootstrap
- func (b *Bootstrap) Build(build int) *Bootstrap
- func (b *Bootstrap) GLog() *Bootstrap
- func (b *Bootstrap) LogOutput(w io.Writer) *Bootstrap
- func (b *Bootstrap) LogPrefix(prefix string) *Bootstrap
- func (b *Bootstrap) Major(major int) *Bootstrap
- func (b *Bootstrap) Minor(minor int) *Bootstrap
- func (b *Bootstrap) Revision(rev string) *Bootstrap
- func (b *Bootstrap) Syslog() *Bootstrap
- func (b *Bootstrap) SyslogDial(uri *url.URL) *Bootstrap
- func (b *Bootstrap) Version(major, minor, build int) *Bootstrap
- type Context
- type ContextAware
- type LogfFunc
- type LoggingAdapter
- type Service
- type ServiceLifecycleAware
- type ServiceSlots
- type ServiceStatus
- type Slot
- type Subscriber
- type Value
- type Version
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LogAdapter = &LoggingAdapter{ Debugf: func(format string, v ...interface{}) { log.Printf("DEBUG: "+format, v...) }, Infof: func(format string, v ...interface{}) { log.Printf("INFO: "+format, v...) }, Warnf: func(format string, v ...interface{}) { log.Printf("WARN: "+format, v...) }, Errorf: func(format string, v ...interface{}) { log.Printf("ERROR: "+format, v...) }, Fatalf: func(format string, v ...interface{}) { log.Fatalf("FATAL: "+format, v...) }, Panicf: func(format string, v ...interface{}) { log.Panicf("FATAL: "+format, v...) }, } GLogAdapter = &LoggingAdapter{ Debugf: glog.V(2).Infof, Infof: glog.V(1).Infof, Warnf: glog.Warningf, Errorf: glog.Errorf, Fatalf: glog.Fatalf, Panicf: func(format string, v ...interface{}) { s := fmt.Sprintf(format, v...) glog.ErrorDepth(1, s) panic(s) }, } )
View Source
var (
ErrSubscriberNotFound = errors.New("subscriber not found")
)
Functions ¶
This section is empty.
Types ¶
type AppLifeCycleAware ¶
type BaseService ¶
type BaseService struct { Serve func() error Slots ServiceSlots // contains filtered or unexported fields }
func NewBaseService ¶
func NewBaseService(name string) *BaseService
func (*BaseService) Name ¶
func (s *BaseService) Name() string
func (*BaseService) Start ¶
func (s *BaseService) Start() error
func (*BaseService) Started ¶
func (s *BaseService) Started() bool
func (*BaseService) Stop ¶
func (s *BaseService) Stop() error
type Bootstrap ¶
type Bootstrap struct {
// contains filtered or unexported fields
}
func NewBootstrap ¶
type ContextAware ¶
type ContextAware interface {
SetContext(ctxt Context)
}
type LoggingAdapter ¶
type LoggingAdapter struct {
Debugf, Infof, Warnf, Errorf, Fatalf, Panicf LogfFunc
}
type ServiceLifecycleAware ¶
type ServiceSlots ¶
type ServiceStatus ¶
type ServiceStatus int32
const ( ServiceUnused ServiceStatus = iota ServiceStarted ServiceStopped )
func (ServiceStatus) String ¶
func (s ServiceStatus) String() string
type Subscriber ¶
Click to show internal directories.
Click to hide internal directories.