Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GRPCRuleMgr ¶
GRPCRuleMgr ...
var GRPC *GRPCRuleMgr
GRPC global rule manager ...
func (*GRPCRuleMgr) CreateOrUpdateRule ¶
func (h *GRPCRuleMgr) CreateOrUpdateRule(servicePrefix, forwardDst string, insecure bool)
CreateOrUpdateRule creates or update rule for uri prefix servicePrefix is like /proto.TestService/xxxxx forwardDst is the full access address the request will be forward to
func (*GRPCRuleMgr) ListRules ¶
func (h *GRPCRuleMgr) ListRules() []GRPCRule
ListRules lists all rules
func (*GRPCRuleMgr) RemoveRule ¶
func (h *GRPCRuleMgr) RemoveRule(uriPrefix string) error
RemoveRule removes rule for prefix
type HTTPRule ¶
type HTTPRule struct {
URIPrefix, ForwardDst string
}
HTTPRule defines the rule structure
type HTTPRuleMgr ¶
HTTPRuleMgr ...
var HTTP *HTTPRuleMgr
HTTP global rule manager ...
func (*HTTPRuleMgr) CreateOrUpdateRule ¶
func (h *HTTPRuleMgr) CreateOrUpdateRule(uriPrefix, forwardDst string)
CreateOrUpdateRule creates or update rule for uri prefix uriPrefix is like /path forwardDst is the full access address the request will be forward to
func (*HTTPRuleMgr) ListRules ¶
func (h *HTTPRuleMgr) ListRules() []HTTPRule
ListRules lists all rules
func (*HTTPRuleMgr) RemoveRule ¶
func (h *HTTPRuleMgr) RemoveRule(uriPrefix string) error
RemoveRule removes rule for prefix
Source Files ¶
Click to show internal directories.
Click to hide internal directories.