status

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func (*StateStorage) Reset

func (s *StateStorage) Reset()

Reset Client storage.

Jump to

Keyboard shortcuts

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