health

package
v0.0.0-...-8d8ec1c Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package health - Health Check 기능 제공 패키지

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlerFunc

func HandlerFunc(rw http.ResponseWriter, req *http.Request)

HandlerFunc - Check 처리용 HTTP Handler

func Register

func Register(c Config)

Register - Check 구성 정보 설정

func Reset

func Reset()

Reset - 기존에 설정되어 있던 설정 해체

Types

type Check

type Check struct {
	Status    string            `yaml:"status" json:"status"`
	Timestamp time.Time         `yaml:"timestamp" json:"timestamp"`
	Failures  map[string]string `yaml:"failures,omitempty"`
	System    `yaml:"system" json:"system"`
}

Check - Healh Check 상태 정보 구조

type CheckFunc

type CheckFunc func() error

CheckFunc - Check 실행 함수

type Config

type Config struct {
	Name string
	// 처리 시간 (기본값: 2 second)
	Timeout   time.Duration
	SkipOnErr bool
	Check     CheckFunc
}

Config - Check 처리를 위한 설정 구조

type System

type System struct {
	Version          string `yaml:"version" json:"version"`
	GoroutinesCount  int    `yaml:"goroutines_count" json:"goroutines_count"`
	TotalAllocBytes  int    `yaml:"total_alloc_bytes" json:"total_alloc_bytes"`
	HeapObjectsCount int    `yaml:"heap_objects_count" json:"heap_objects_count"`
	AllocBytes       int    `yaml:"alloc_bytes" json:"alloc_bytes"`
}

System - Go Process에 대한 정보 구조

Jump to

Keyboard shortcuts

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