http

package
v0.0.0-...-1a18185 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	REST_PATH_UPLOAD            = "/appmesh/file/upload"
	REST_PATH_DOWNLOAD          = "/appmesh/file/download"
	REST_PATH_FILE              = "/appmesh/file/"
	HTTP_USER_AGENT_HEADER_NAME = "User-Agent"
	HTTP_USER_AGENT             = "appmeshsdk"
)
View Source
const (
	TCP_CHUNK_READ_BLOCK_SIZE = 2048
	PROTOBUF_HEADER_LENGTH    = 4
)
View Source
const PROMETHEUS_METRIC_REST_PATH string = "/metrics"

Variables

View Source
var (
	DockerSocketFilePath = "/var/run/docker.sock"
)

Functions

func ListenDocker

func ListenDocker(dockerAgentAddr string)

func ListenPrometheus

func ListenPrometheus(port int)

func ListenRest

func ListenRest(restAgentAddr string, restTcpPort int)

Types

type Request

type Request struct {
	Uuid          string            `msg:"uuid" msgpack:"uuid"`
	RequestUri    string            `msg:"request_uri" msgpack:"request_uri"`
	HttpMethod    string            `msg:"http_method" msgpack:"http_method"`
	ClientAddress string            `msg:"client_addr" msgpack:"client_addr"`
	Body          string            `msg:"body" msgpack:"body"`
	Headers       map[string]string `msg:"headers" msgpack:"headers"`
	Querys        map[string]string `msg:"querys" msgpack:"querys"`
}

type Response

type Response struct {
	Uuid        string            `msg:"uuid" msgpack:"uuid"`
	RequestUri  string            `msg:"request_uri" msgpack:"request_uri"`
	HttpStatus  int               `msg:"http_status" msgpack:"http_status"`
	BodyMsgType string            `msg:"body_msg_type" msgpack:"body_msg_type"`
	Body        string            `msg:"body" msgpack:"body"`
	Headers     map[string]string `msg:"headers" msgpack:"headers"`
}

type ResponseMessage

type ResponseMessage struct {
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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