proute

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const KeyPluginProxyRouteMap = "plugin_proxy_route_map"

Variables

View Source
var (
	ErrPluginRouteExsist          = errors.New("error plugin route existed")
	ErrPluginRouteNotExsist       = errors.New("error plugin route not existed")
	ErrPluginRouteVersionMismatch = errors.New("error plugin route version mismatch")
)

Functions

This section is empty.

Types

type DaprStateOprator

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

func NewDaprStateOperator

func NewDaprStateOperator(storeName string, c dapr.Client) *DaprStateOprator

func (*DaprStateOprator) Create

func (o *DaprStateOprator) Create(ctx context.Context, pr *model.PluginRoute) error

func (*DaprStateOprator) Delete

func (o *DaprStateOprator) Delete(ctx context.Context, pluginID string) (*model.PluginRoute, error)

func (*DaprStateOprator) Get

func (o *DaprStateOprator) Get(ctx context.Context, pluginID string) (*model.PluginRoute, error)

func (*DaprStateOprator) Update

func (o *DaprStateOprator) Update(ctx context.Context, pr *model.PluginRoute) error

func (*DaprStateOprator) Watch

func (o *DaprStateOprator) Watch(ctx context.Context, interval string, callback func(model.PluginProxyRouteMap) error) error

Watch Block waiting for plugin proxy route map changes. when it changes, call callback function.

type Operator

type Operator interface {
	// Create plugin route.
	Create(context.Context, *model.PluginRoute) error
	// Update plugin route.
	Update(context.Context, *model.PluginRoute) error
	// Get plugin route with the pluginID.
	Get(ctx context.Context, pluginID string) (*model.PluginRoute, error)
	// Delete plugin route with the pluginID.
	Delete(ctx context.Context, pluginID string) (*model.PluginRoute, error)
	// Watch plugin proxy route map change.
	Watch(ctx context.Context, interval string, callback func(model.PluginProxyRouteMap) error) error
}

Operator contains all operations to plugin route. Version.

Jump to

Keyboard shortcuts

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