metric

package
v0.0.0-...-eb22c10 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKitHandler

func NewKitHandler(ctx context.Context, ep *Endpoint) *kithttp.Server

NewKitHandler create new kit handler

Types

type Endpoint

type Endpoint struct {
	M *Metric
}

Endpoint for Alias Direct Link

func (*Endpoint) Response

func (ep *Endpoint) Response(r *Request) (*Response, error)

Response for Alias Direct Link request

type Metric

type Metric struct {
	// contains filtered or unexported fields
}

Metric for service

func (*Metric) GetRequestsCount

func (m *Metric) GetRequestsCount() int

GetRequestsCount return count of requests that service handled during his life

func (*Metric) IncRequestsCount

func (m *Metric) IncRequestsCount()

IncRequestsCount increment requests count

type Request

type Request struct {
}

Request for Alias direct link

func NewRequest

func NewRequest() *Request

NewRequest create new request

type Response

type Response struct {
	V   string `json:"v"`
	Err string `json:"err,omitempty"` // errors don't define JSON marshaling
}

Response for Alias Direct Link request

Jump to

Keyboard shortcuts

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