server

package
v0.0.0-...-b4df050 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type K8sHandler

type K8sHandler struct {
	K8sToken string
	K8sHost  string
	K8sPort  string
	// contains filtered or unexported fields
}

K8sHandler Structure

var K8s *K8sHandler

K8s Handler

func NewK8sHandler

func NewK8sHandler() *K8sHandler

NewK8sHandler 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) WatchKubeArmorAlertRules

func (kh K8sHandler) WatchKubeArmorAlertRules() watch.Interface

WatchK8sAlertRules Function

type KoachServer

type KoachServer struct {
	// port
	Port string

	// gRPC listener
	Listener net.Listener

	// observability service
	ObservabilityService service.IObservabilityService

	// log client
	LogClient *LogClient

	proto.UnimplementedObservabilityServiceServer

	// alert
	AlertRules   map[string]koach_api.KubeArmorAlertRuleSpec
	AlertStructs map[string]model.AlertStruct
	AlertLock    *sync.RWMutex
}

KoachServer Structure

func NewKoachServer

func NewKoachServer(port string, db *gorm.DB) *KoachServer

NewKoachServer Function

func (*KoachServer) CheckObservabilityWithAlertRule

func (ks *KoachServer) CheckObservabilityWithAlertRule(observability model.Observability)

func (*KoachServer) DestroyKoachServer

func (ks *KoachServer) DestroyKoachServer() error

DestroyKoachServer Function

func (*KoachServer) Get

func (ks *KoachServer) Get(ctx context.Context, request *proto.GetRequest) (*proto.GetResponse, error)

func (*KoachServer) GetFeedsFromRelay

func (ks *KoachServer) GetFeedsFromRelay(relayConfig config.RelayConfig)

func (*KoachServer) ListenAlert

func (*KoachServer) NewLogClient

func (ks *KoachServer) NewLogClient(server string) error

func (*KoachServer) PeriodicDataDeletion

func (ks *KoachServer) PeriodicDataDeletion(ageString string)

func (*KoachServer) WatchAlertRule

func (ks *KoachServer) WatchAlertRule()

func (*KoachServer) WatchLogs

func (ks *KoachServer) WatchLogs()

type LogClient

type LogClient struct {
	// flags
	Running bool
	// contains filtered or unexported fields
}

LogClient Structure

func (*LogClient) DestroyClient

func (lc *LogClient) DestroyClient() error

Jump to

Keyboard shortcuts

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