Documentation
¶
Index ¶
- Constants
- func HealthCheck() bool
- func HttpGetResilienceById(w http.ResponseWriter, r *http.Request)
- func HttpGetResilienceRestart(w http.ResponseWriter, r *http.Request)
- func HttpGetResilienceStop(w http.ResponseWriter, r *http.Request)
- func Restart(id string) error
- func Stop(id string) error
- type Instance
- type Status
- type TpStore
Constants ¶
const ( EVENT_RESILIENCE_STATUS = "resilience:status" EVENT_RESILIENCE_STOP = "resilience:stop" EVENT_RESILIENCE_RESTART = "resilience:restart" EVENT_RESILIENCE_FAILED = "resilience:failed" )
const ( MSG_RESILIENCE_NOT_INITIALIZED = "resilience no esta inicializado" MSG_ID_REQUIRED = "id es requerido" MSG_ID_NOT_FOUND = "id no encontrado" MSG_INSTANCE_STOPPED = "intento detenido" MSG_INSTANCE_RESTARTED = "intento reiniciado" MSG_INSTANCE_NOT_FOUND = "intento no encontrado" MSG_RESILIENCE_STATUS = "Attempt:%d de %d Instance:%s, Tag:%s Status:%s" MSG_RESILIENCE_ERROR = "Attempt:%d de %d Error en Instance:%s Tag:%s Status:%s, Error:%s" MSG_RESILIENCE_FINISHED = "Attempt:%d de %d Finalizado Instance:%s Tag:%s Status:%s" MSG_RESILIENCE_FINISHED_ERROR = "Attempt:%d de %d Finalizado con error Instance:%s Tag:%s Status:%s, Error:%s" )
Variables ¶
This section is empty.
Functions ¶
func HttpGetResilienceById ¶
func HttpGetResilienceById(w http.ResponseWriter, r *http.Request)
* * HttpGetResilienceById * @param w http.ResponseWriter, r *http.Request *
func HttpGetResilienceRestart ¶ added in v0.1.18
func HttpGetResilienceRestart(w http.ResponseWriter, r *http.Request)
* * HttpGetResilienceRestart * @param w http.ResponseWriter, r *http.Request *
func HttpGetResilienceStop ¶ added in v0.1.18
func HttpGetResilienceStop(w http.ResponseWriter, r *http.Request)
* * HttpGetResilienceStop * @param w http.ResponseWriter, r *http.Request *
Types ¶
type Instance ¶ added in v0.1.18
type Instance struct {
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
LastAttemptAt time.Time `json:"last_attempt_at"`
DoneAt time.Time `json:"done_at"`
Id string `json:"id"`
Tag string `json:"tag"`
Description string `json:"description"`
Status Status `json:"status"`
TpStore TpStore `json:"store"`
Attempt int `json:"attempt"`
TotalAttempts int `json:"total_attempts"`
TimeAttempts time.Duration `json:"time_attempts"`
RetentionTime time.Duration `json:"retention_time"`
Tags et.Json `json:"tags"`
Team string `json:"team"`
Level string `json:"level"`
// contains filtered or unexported fields
}
func Add ¶
func Add(id, tag, description string, tags et.Json, team string, level string, fn interface{}, fnArgs ...interface{}) *Instance
* * Add * @param tag, description string, tags et.Json, team string, level string, fn interface{}, fnArgs ...interface{} * @return *Instance
func AddCustom ¶ added in v0.1.18
func AddCustom(id, tag, description string, totalAttempts int, timeAttempts, retentionTime time.Duration, tags et.Json, team string, level string, fn interface{}, fnArgs ...interface{}) *Instance
* * AddCustom * @param id, tag, description string, totalAttempts int, timeAttempts, retentionTime time.Duration, tags et.Json, team string, level string, fn interface{}, fnArgs ...interface{} * @return *Instance
func NewInstance ¶ added in v0.1.18
func NewInstance(id, tag, description string, totalAttempts int, timeAttempts, retentionTime time.Duration, tags et.Json, team string, level string, fn interface{}, fnArgs ...interface{}) *Instance
* * Instance * @param id, tag, description string, totalAttempts int, timeAttempts, retentionTime time.Duration, tags et.Json, team string, level string, fn interface{}, fnArgs ...interface{} * @return Instance