Versions in this module Expand all Collapse all v1 v1.0.0 Oct 16, 2017 Changes in this version + const SERVICE_RUNNING + const SERVICE_SHUTTING_DOWN + const SERVICE_STOPPED + type AtomicDuration int64 + func (d *AtomicDuration) Add(duration time.Duration) time.Duration + func (d *AtomicDuration) CompareAndSwap(oldval, newval time.Duration) (swapped bool) + func (d *AtomicDuration) Get() time.Duration + func (d *AtomicDuration) Set(duration time.Duration) + type AtomicInt32 int32 + func (i *AtomicInt32) Add(n int32) int32 + func (i *AtomicInt32) CompareAndSwap(oldval, newval int32) (swapped bool) + func (i *AtomicInt32) Get() int32 + func (i *AtomicInt32) Set(n int32) + type AtomicInt64 int64 + func (i *AtomicInt64) Add(n int64) int64 + func (i *AtomicInt64) CompareAndSwap(oldval, newval int64) (swapped bool) + func (i *AtomicInt64) Get() int64 + func (i *AtomicInt64) Set(n int64) + type AtomicString struct + func (s *AtomicString) CompareAndSwap(oldval, newval string) (swqpped bool) + func (s *AtomicString) Get() string + func (s *AtomicString) Set(str string) + type AtomicUint32 uint32 + func (i *AtomicUint32) Add(n uint32) uint32 + func (i *AtomicUint32) CompareAndSwap(oldval, newval uint32) (swapped bool) + func (i *AtomicUint32) Get() uint32 + func (i *AtomicUint32) Set(n uint32) + type Cond struct + L sync.Locker + func NewCond(l sync.Locker) *Cond + func (c *Cond) Broadcast() + func (c *Cond) Signal() + func (c *Cond) Wait() + type Semaphore struct + func NewSemaphore(count int, timeout time.Duration) *Semaphore + func (sem *Semaphore) Acquire() bool + func (sem *Semaphore) Release() + type ServiceContext struct + ShuttingDown chan struct{} + func (svc *ServiceContext) IsRunning() bool + type ServiceManager struct + func (svm *ServiceManager) Go(service func(svc *ServiceContext) error) bool + func (svm *ServiceManager) Join() error + func (svm *ServiceManager) State() int64 + func (svm *ServiceManager) StateName() string + func (svm *ServiceManager) Stop() bool + func (svm *ServiceManager) Wait()