service

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KitJSONDecodeFunc

func KitJSONDecodeFunc(r *http.Request, request interface{}) (interface{}, error)

KitJSONDecodeFunc decode json http request to endpoint request

func KitJSONEncodeFunc

func KitJSONEncodeFunc(w http.ResponseWriter, response interface{}) error

KitJSONEncodeFunc encode endpoint response to json

Types

type Config

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

Config keep service configuration parameters

func NewConfig

func NewConfig(host string, port int, path, metricPath string) *Config

NewConfig create new Config configuration for service

func (*Config) GetHost

func (c *Config) GetHost() string

GetHost return host, that service will be listen

func (*Config) GetMetricPath

func (c *Config) GetMetricPath() string

GetMetricPath return path that can be used for request metric information

func (*Config) GetPath

func (c *Config) GetPath() string

GetPath return path that service handled

func (*Config) GetPort

func (c *Config) GetPort() int

GetPort return port, that service will be listen

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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