grpc_router

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(v *Config, workers map[eosc.RequireId]eosc.IWorker) error

func Create

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

Create 创建一个http路由驱动实例

func Register

func Register(register eosc.IExtenderDriverRegister)

Register 注册grpc路由驱动工厂

Types

type Config

type Config struct {
	Listen int `json:"listen" yaml:"listen" title:"port" description:"使用端口" default:"80" label:"端口号" maximum:"65535"`

	Host []string `json:"host" yaml:"host" label:"域名"`

	ServiceName string         `json:"service_name" yaml:"service_name" label:"服务名"`
	MethodName  string         `json:"method_name" yaml:"method_name" label:"方法名"`
	Rules       []Rule         `json:"rules" yaml:"rules" label:"路由规则"`
	Service     eosc.RequireId `` /* 126-byte string literal not displayed */
	Template    eosc.RequireId `` /* 132-byte string literal not displayed */
	Disable     bool           `json:"disable" yaml:"disable" label:"禁用路由"`
	Plugins     plugin.Plugins `json:"plugins" yaml:"plugins" label:"插件配置"`
	Retry       int            `json:"retry" label:"重试次数" yaml:"retry"`
	TimeOut     int            `json:"time_out" label:"超时时间"`
}

type Finisher

type Finisher struct {
}

func (*Finisher) Finish

func (f *Finisher) Finish(org eocontext.EoContext) error

type GrpcRouter

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

func (*GrpcRouter) CheckSkill

func (h *GrpcRouter) CheckSkill(skill string) bool

func (*GrpcRouter) Destroy

func (h *GrpcRouter) Destroy() error

func (*GrpcRouter) Id

func (h *GrpcRouter) Id() string

func (*GrpcRouter) Reset

func (h *GrpcRouter) Reset(conf interface{}, workers map[eosc.RequireId]eosc.IWorker) error

func (*GrpcRouter) Start

func (h *GrpcRouter) Start() error

func (*GrpcRouter) Stop

func (h *GrpcRouter) Stop() error

type RouterDriverFactory

type RouterDriverFactory struct {
	eosc.IExtenderDriverFactory
}

RouterDriverFactory http路由驱动工厂结构体

func NewRouterDriverFactory

func NewRouterDriverFactory() *RouterDriverFactory

NewRouterDriverFactory 创建一个http路由驱动工厂

func (*RouterDriverFactory) Create

func (r *RouterDriverFactory) Create(profession string, name string, label string, desc string, params map[string]interface{}) (eosc.IExtenderDriver, error)

Create 创建http路由驱动

type Rule

type Rule struct {
	Type  string `json:"type" yaml:"type" label:"类型" enum:"header"`
	Name  string `json:"name" yaml:"name" label:"参数名"`
	Value string `json:"value" yaml:"value" label:"值规" `
}

Rule 规则

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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