http

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBodyCodec

func GetBodyCodec(contentTypeBytes []byte) byte

GetBodyCodec returns the codec id from content type.

func RegBodyCodec

func RegBodyCodec(contentType string, codecId byte)

RegBodyCodec registers a mapping of content type to body coder.

func Serve

func Serve(srvCfg OuterHttpSrvConfig)

Serve starts HTTP gateway service.

Types

type OuterHttpSrvConfig

type OuterHttpSrvConfig struct {
	ListenAddress string `yaml:"listen_address"`
	TlsCertFile   string `yaml:"tls_cert_file"`
	TlsKeyFile    string `yaml:"tls_key_file"`
	AllowCross    bool   `yaml:"allow_cross"`
}

OuterHttpSrvConfig config of HTTP server

Jump to

Keyboard shortcuts

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