gin

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPHandlerFactory

NewHTTPHandlerFactory - Router 단위의 Metrics 처리를 수행하는 HandlerFactory 생성

Types

type Collector

type Collector struct {
	*metrics.Producer
}

Collector - Metrics 기반의 Collector 구조

func New

func New(ctx context.Context, mConf config.MWConfig, log logging.Logger, debugMode bool) *Collector

New - Metric Collector를 생성하고 Collection 처리를 위한 Endpoint Server 구동

func (*Collector) HandlerFactory

HandlerFactory - 전달된 HandlerFactory 수행 전에 필요한 Metric 관련 처리를 수행하는 HandlerFactory 구성

func (*Collector) NewEngine

func (c *Collector) NewEngine(debugMode bool) *gin.Engine

NewEngine - Stats 처리를 위한 Endpoint 역할을 담당하는 Gin Engine 생성

func (*Collector) NewExportHandler

func (c *Collector) NewExportHandler() gin.HandlerFunc

NewExportHandler - 수집된 Metrics를 JSON 포맷으로 노출하는 go-metrics에서 제공되는 http.Handler 생성

func (*Collector) RunEndpoint

func (c *Collector) RunEndpoint(ctx context.Context, engine *gin.Engine, log logging.Logger)

RunEndpoint - Gin Engine 기반으로 http.Server 구동

Jump to

Keyboard shortcuts

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