core

package
v0.0.0-...-20dd9da Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StopChan chan struct{}

StopChan Channel

Functions

func Find

func Find(identities []uint16, identity uint16) (int, bool)

func GetOSSigChannel

func GetOSSigChannel() chan os.Signal

GetOSSigChannel Function

func KVMSOperatorDaemon

func KVMSOperatorDaemon(port int, ipAddress string)

KVMSService Function

Types

type ClientConn

type ClientConn struct {
	*grpc.ClientConn
	// contains filtered or unexported fields
}

ClientConn is the wrapper for a grpc client conn

type K8sHandler

type K8sHandler struct {
	K8sClient   *kubernetes.Clientset
	HTTPClient  *http.Client
	WatchClient *http.Client

	K8sToken string
	K8sHost  string
	K8sPort  string
}

K8sHandler Structure

var K8s *K8sHandler

K8s Handler

func NewK8sHandler

func NewK8sHandler() *K8sHandler

NewK8sHandler Function

func (*K8sHandler) CheckCustomResourceDefinition

func (kh *K8sHandler) CheckCustomResourceDefinition(resourceName string) bool

CheckCustomResourceDefinition Function

func (*K8sHandler) DoRequest

func (kh *K8sHandler) DoRequest(cmd string, data interface{}, path string) ([]byte, error)

DoRequest Function

func (*K8sHandler) InitInclusterAPIClient

func (kh *K8sHandler) InitInclusterAPIClient() bool

InitInclusterAPIClient Function

func (*K8sHandler) InitK8sClient

func (kh *K8sHandler) InitK8sClient() bool

InitK8sClient Function

func (*K8sHandler) InitLocalAPIClient

func (kh *K8sHandler) InitLocalAPIClient() bool

InitLocalAPIClient Function

func (*K8sHandler) WatchK8sExternalWorkloadSecurityPolicies

func (kh *K8sHandler) WatchK8sExternalWorkloadSecurityPolicies() *http.Response

WatchK8sExternalWorkloadSecurityPolicies Function

type KVMSOperator

type KVMSOperator struct {
	EtcdClient *etcd.EtcdClient
	CliHandler *cli.Server

	EnableExternalWorkloadPolicy bool

	Port      uint16
	ClusterIp string

	// External workload policies and mappers
	ExternalWorkloadSecurityPolicies     []tp.ExternalWorkloadSecurityPolicy
	ExternalWorkloadSecurityPoliciesLock *sync.RWMutex

	MapIdentityToEWName map[uint16]string
	MapEWNameToIdentity map[string]uint16

	MapIdentityToLabel              map[uint16]string
	MapLabelToIdentities            map[string][]uint16
	MapExternalWorkloadConnIdentity map[uint16]ClientConn

	// WgOperatorDaemon Handler
	WgOperatorDaemon sync.WaitGroup
	// contains filtered or unexported fields
}

KVMSOperator Structure

func NewKVMSOperatorDaemon

func NewKVMSOperatorDaemon(port int, ipAddress string) *KVMSOperator

NewKVMSOperatorDaemon Function

func (*KVMSOperator) DestroyKVMSOperator

func (dm *KVMSOperator) DestroyKVMSOperator()

DestroyKVMSOperator Function

func (*KVMSOperator) GenerateExternalWorkloadIdentity

func (dm *KVMSOperator) GenerateExternalWorkloadIdentity(name string, labels map[string]string) uint16

func (*KVMSOperator) GetEWIdentityFromName

func (dm *KVMSOperator) GetEWIdentityFromName(name string) uint16

func (*KVMSOperator) GetExternalWorkLoadAllLabels

func (dm *KVMSOperator) GetExternalWorkLoadAllLabels() []string

func (*KVMSOperator) GetExternalWorkloadIdentities

func (dm *KVMSOperator) GetExternalWorkloadIdentities(name string) []uint16

func (*KVMSOperator) GetExternalWorkloadLabel

func (dm *KVMSOperator) GetExternalWorkloadLabel(identity uint16) string

func (*KVMSOperator) UnMapLabelIdentity

func (dm *KVMSOperator) UnMapLabelIdentity(identity uint16, ewName, label string)

func (*KVMSOperator) UpdateExternalWorkloadSecurityPolicies

func (dm *KVMSOperator) UpdateExternalWorkloadSecurityPolicies()

UpdateExternalWorkloadSecurityPolicies Function

func (*KVMSOperator) UpdateIdentityLabelsMap

func (dm *KVMSOperator) UpdateIdentityLabelsMap(identity uint16, label string)

func (*KVMSOperator) WatchExternalWorkloadSecurityPolicies

func (dm *KVMSOperator) WatchExternalWorkloadSecurityPolicies()

WatchExternalWorkloadSecurityPolicies Function

Jump to

Keyboard shortcuts

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