circuitbreaker

package
v0.1.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	IndexResource = "resource"
	IndexRest     = "rest"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ManagerInterface

type ManagerInterface interface {
	Validator
	Sync(config *ctrlmeshproto.CircuitBreaker) (*ctrlmeshproto.ConfigResp, error)
}

func NewManager

func NewManager(ctx context.Context) ManagerInterface

type ValidateResult

type ValidateResult struct {
	Allowed bool
	Reason  string
	Message string
}

type Validator

type Validator interface {
	ValidateTrafficIntercept(URL string, method string) (result *ValidateResult)
	ValidateRest(URL string, method string) (result ValidateResult)
	ValidateResource(namespace, apiGroup, resource, verb string) (result ValidateResult)
	HandlerWrapper() func(http.Handler) http.Handler
}

Jump to

Keyboard shortcuts

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