wirer

package
v0.0.0-...-984f6f0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// errors
	NotFound = "not found"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action string
const (
	DeleteAction Action = "delete"
	UpsertAction Action = "upsert"
)

type Cache

type Cache[T1 any] interface {
	Get(types.NamespacedName) (T1, error)
	Upsert(context.Context, types.NamespacedName, T1)
	Delete(context.Context, types.NamespacedName)
	List() map[types.NamespacedName]T1
	AddWatch(fn ResourceCallbackFn)
}

func NewCache

func NewCache[T1 any]() Cache[T1]

type CallbackFn

type CallbackFn func([]types.NamespacedName, string)

type DaemonWirer

type DaemonWirer interface {
	Node2NodeWirer
	Ep2NodeWirer
}

type Ep2NodeWirer

type Ep2NodeWirer interface {
	EndpointGet(ctx context.Context, req *endpointpb.EndpointRequest) (*endpointpb.EndpointResponse, error)
	EndpointUpSert(ctx context.Context, req *endpointpb.EndpointRequest) (*endpointpb.EmptyResponse, error)
	EndpointDelete(ctx context.Context, req *endpointpb.EndpointRequest) (*endpointpb.EmptyResponse, error)
	AddEndpointWatch(fn CallbackFn)
	DeleteEndpointWatch()
}

type InClusterWirer

type InClusterWirer interface {
	Node2NodeWirer
	Ep2NodeWirer
}

type InterClusterWirer

type InterClusterWirer interface {
	Node2NodeWirer
}

type Node2NodeWirer

type Node2NodeWirer interface {
	WireGet(ctx context.Context, req *wirepb.WireRequest) (*wirepb.WireResponse, error)
	WireUpSert(ctx context.Context, req *wirepb.WireRequest) (*wirepb.EmptyResponse, error)
	WireDelete(ctx context.Context, req *wirepb.WireRequest) (*wirepb.EmptyResponse, error)
	AddWireWatch(fn CallbackFn)
	DeleteWireWatch()
}

type Object

type Object struct {
	IsReady bool
}

type ResourceCallbackFn

type ResourceCallbackFn func(context.Context, Action, types.NamespacedName, any)

type Wirer

type Wirer interface {
	Node2NodeWirer
	Ep2NodeWirer
}

Directories

Path Synopsis
backend
cache
pod
proxy
vxlan

Jump to

Keyboard shortcuts

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