go-micro: github.com/micro/go-micro/proxy/http Index | Files

package http

import "github.com/micro/go-micro/proxy/http"

Package http provides a micro rpc to http proxy

Index

Package Files

http.go

func NewProxy Uses

func NewProxy(opts ...proxy.Option) proxy.Proxy

NewProxy returns a new proxy which will route using a http client

func NewSingleHostProxy Uses

func NewSingleHostProxy(url string) proxy.Proxy

NewSingleHostProxy returns a router which sends requests to a single http backend

type Proxy Uses

type Proxy struct {

    // The http backend to call
    Endpoint string
    // contains filtered or unexported fields
}

Proxy will proxy rpc requests as http POST requests. It is a server.Proxy

func (*Proxy) ProcessMessage Uses

func (p *Proxy) ProcessMessage(ctx context.Context, msg server.Message) error

ProcessMessage handles incoming asynchronous messages

func (*Proxy) ServeRequest Uses

func (p *Proxy) ServeRequest(ctx context.Context, req server.Request, rsp server.Response) error

ServeRequest honours the server.Router interface

func (*Proxy) String Uses

func (p *Proxy) String() string

Package http imports 10 packages (graph) and is imported by 4 packages. Updated 2020-01-31. Refresh now. Tools for package owners.