k8s

package module
v0.0.0-...-9b15f3e Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

README

Sentinel Go Kubernetes CRD data-source

Install Sentinel rule CRDs:

kubectl apply -f config/crd/bases

Samples

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CRDType

type CRDType int32
const (
	FlowRulesCRD CRDType = iota
	IsolationRulesCRD
	CircuitBreakerRulesCRD
	HotspotRulesCRD
	SystemRulesCRD
)

func (CRDType) String

func (c CRDType) String() string

type DataSource

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

func NewDataSource

func NewDataSource(namespace string) (*DataSource, error)

NewDataSource creates a K8S DataSource with given namespace All Controllers take effective only when match namespace.

func (*DataSource) Close

func (k *DataSource) Close() error

Close exit the K8S DataSource

func (*DataSource) RegisterController

func (k *DataSource) RegisterController(crd CRDType, crName string) error

RegisterController register given type crd and crd name For each type CRD can only register once.

func (*DataSource) Run

func (k *DataSource) Run() error

Run runs the k8s DataSource

Directories

Path Synopsis
api
v1alpha1
Package v1 contains API Schema definitions for the datasource v1 API group +kubebuilder:object:generate=true +groupName=datasource.sentinel.io
Package v1 contains API Schema definitions for the datasource v1 API group +kubebuilder:object:generate=true +groupName=datasource.sentinel.io

Jump to

Keyboard shortcuts

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