Documentation ¶
Index ¶
- Variables
- func InitAppStatus(conf *config.ConfigData) error
- type App
- type StateStorage
- func (s *StateStorage) AddCacheError(count int64)
- func (s *StateStorage) AddCacheSuccess(count int64)
- func (s *StateStorage) AddFmcsaError(count int64)
- func (s *StateStorage) AddFmcsaSuccess(count int64)
- func (s *StateStorage) AddTotalCount(count int64)
- func (s *StateStorage) Close() error
- func (s *StateStorage) GetCacheError() int64
- func (s *StateStorage) GetCacheSuccess() int64
- func (s *StateStorage) GetFmcsaError() int64
- func (s *StateStorage) GetFmcsaSuccess() int64
- func (s *StateStorage) GetTotalCount() int64
- func (s *StateStorage) Init() error
- func (s *StateStorage) Reset()
Constants ¶
This section is empty.
Variables ¶
var Stats *stats.Stats
Stats provide response time, status code count, etc.
Functions ¶
func InitAppStatus ¶
func InitAppStatus(conf *config.ConfigData) error
InitAppStatus for initialize app status
Types ¶
type App ¶
type App struct { Version string `json:"version"` TotalCount int64 `json:"total_count"` FmcsaSuccessCount int64 `json:"fmcsa_success_count"` FmcsaFailedCount int64 `json:"fmcsa_failed_count"` CacheSuccessCount int64 `json:"cache_success_count"` CacheFailedCount int64 `json:"cache_failed_count"` }
App is status structure
type StateStorage ¶
type StateStorage struct {
// contains filtered or unexported fields
}
var StatStorage *StateStorage
StatStorage implements the storage interface
func NewStateStorage ¶
func NewStateStorage(store core.Storage) *StateStorage
func (*StateStorage) AddCacheError ¶
func (s *StateStorage) AddCacheError(count int64)
AddCacheError record push notification count.
func (*StateStorage) AddCacheSuccess ¶
func (s *StateStorage) AddCacheSuccess(count int64)
AddCacheSuccess record push notification count.
func (*StateStorage) AddFmcsaError ¶
func (s *StateStorage) AddFmcsaError(count int64)
AddFmcsaError record push notification count.
func (*StateStorage) AddFmcsaSuccess ¶
func (s *StateStorage) AddFmcsaSuccess(count int64)
AddFmcsaSuccess record push notification count.
func (*StateStorage) AddTotalCount ¶
func (s *StateStorage) AddTotalCount(count int64)
AddTotalCount record push notification count.
func (*StateStorage) Close ¶
func (s *StateStorage) Close() error
func (*StateStorage) GetCacheError ¶
func (s *StateStorage) GetCacheError() int64
GetCacheError show success counts of total requests to FMCSA remote server.
func (*StateStorage) GetCacheSuccess ¶
func (s *StateStorage) GetCacheSuccess() int64
GetCacheSuccess show success counts of total requests to FMCSA remote server.
func (*StateStorage) GetFmcsaError ¶
func (s *StateStorage) GetFmcsaError() int64
GetFmcsaError show success counts of total requests to FMCSA remote server.
func (*StateStorage) GetFmcsaSuccess ¶
func (s *StateStorage) GetFmcsaSuccess() int64
GetFmcsaSuccess show success counts of total requests to FMCSA remote server.
func (*StateStorage) GetTotalCount ¶
func (s *StateStorage) GetTotalCount() int64
GetTotalCount show success counts of total requests to server.
func (*StateStorage) Init ¶
func (s *StateStorage) Init() error