http_to_grpc

package
v0.15.12 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "http_to_grpc"
)

Variables

This section is empty.

Functions

func Create

func Create(id, name string, conf *Config, workers map[eosc.RequireId]eosc.IWorker) (eosc.IWorker, error)

func NewFactory

func NewFactory() eosc.IExtenderDriverFactory

func Register

func Register(register eosc.IExtenderDriverRegister)

Types

type Config

type Config struct {
	Service    string            `json:"service" label:"服务名称"`
	Method     string            `json:"method" label:"方法名称"`
	Authority  string            `json:"authority" label:"虚拟主机域名(Authority)"`
	Format     string            `json:"format" label:"数据格式" enum:"json"`
	Reflect    bool              `json:"reflect" label:"反射"`
	ProtobufID eosc.RequireId    `` /* 154-byte string literal not displayed */
	Headers    map[string]string `json:"headers" label:"额外头部"`
}

type Response

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

func NewResponse

func NewResponse() *Response

func (*Response) Body

func (r *Response) Body() []byte

func (*Response) Header

func (r *Response) Header() map[string]string

func (*Response) Write

func (r *Response) Write(p []byte) (n int, err error)

type StatusErr

type StatusErr struct {
	Code string `json:"code"`
	Msg  string `json:"msg"`
}

Jump to

Keyboard shortcuts

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