Documentation ¶
Overview ¶
Package server exports kubearmor logs
Package server exports kubearmor logs ¶
Package server exports kubearmor logs
Index ¶
- Variables
- func DeleteClientEntry(nodeIP string)
- type AlertStruct
- type K8sHandler
- func (kh *K8sHandler) DoRequest(cmd string, data interface{}, path string) ([]byte, error)
- func (kh *K8sHandler) InitInclusterAPIClient() bool
- func (kh *K8sHandler) InitK8sClient() bool
- func (kh *K8sHandler) InitLocalAPIClient() bool
- func (kh *K8sHandler) WatchKubeArmorPods(ctx context.Context, wg *sync.WaitGroup, ipsChan chan string)
- type LogClient
- func (lc *LogClient) DestroyClient() error
- func (lc *LogClient) DoHealthCheck() bool
- func (lc *LogClient) WatchAlerts(wg *sync.WaitGroup, stop chan struct{}, errCh chan error)
- func (lc *LogClient) WatchLogs(wg *sync.WaitGroup, stop chan struct{}, errCh chan error)
- func (lc *LogClient) WatchMessages(wg *sync.WaitGroup, stop chan struct{}, errCh chan error)
- type LogService
- func (ls *LogService) HealthCheck(ctx context.Context, nonce *pb.NonceMessage) (*pb.ReplyMessage, error)
- func (ls *LogService) WatchAlerts(req *pb.RequestMessage, svr pb.LogService_WatchAlertsServer) error
- func (ls *LogService) WatchLogs(req *pb.RequestMessage, svr pb.LogService_WatchLogsServer) error
- func (ls *LogService) WatchMessages(req *pb.RequestMessage, svr pb.LogService_WatchMessagesServer) error
- type LogStruct
- type MsgStruct
- type RelayServer
Constants ¶
This section is empty.
Variables ¶
var AlertBufferChannel chan *pb.Alert
AlertBufferChannel store incoming data from msg stream in buffer
var AlertLock *sync.RWMutex
AlertLock Lock
var AlertStructs map[string]AlertStruct
AlertStructs Map
var ClientList map[string]int
ClientList Map
var ClientListLock *sync.RWMutex
ClientListLock Lock
var LogBufferChannel chan *pb.Log
LogBufferChannel store incoming data from log stream in buffer
var LogLock *sync.RWMutex
LogLock Lock
var LogStructs map[string]LogStruct
LogStructs Map
var MsgBufferChannel chan *pb.Message
MsgBufferChannel store incoming data from Alert stream in buffer
var MsgLock *sync.RWMutex
MsgLock Lock
var MsgStructs map[string]MsgStruct
MsgStructs Map
var Running bool
Running flag
Functions ¶
func DeleteClientEntry ¶
func DeleteClientEntry(nodeIP string)
DeleteClientEntry removes nodeIP from ClientList
Types ¶
type AlertStruct ¶
AlertStruct Structure
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 (*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) WatchKubeArmorPods ¶
type LogClient ¶
type LogClient struct { // flag Running bool // Server Server string // messages MsgStream pb.LogService_WatchMessagesClient // alerts AlertStream pb.LogService_WatchAlertsClient // logs LogStream pb.LogService_WatchLogsClient // wait group WgServer *errgroup.Group Context context.Context // contains filtered or unexported fields }
LogClient Structure
func (*LogClient) WatchAlerts ¶
WatchAlerts Function
type LogService ¶
type LogService struct { }
LogService Structure
func (*LogService) HealthCheck ¶
func (ls *LogService) HealthCheck(ctx context.Context, nonce *pb.NonceMessage) (*pb.ReplyMessage, error)
HealthCheck Function
func (*LogService) WatchAlerts ¶
func (ls *LogService) WatchAlerts(req *pb.RequestMessage, svr pb.LogService_WatchAlertsServer) error
WatchAlerts Function
func (*LogService) WatchLogs ¶
func (ls *LogService) WatchLogs(req *pb.RequestMessage, svr pb.LogService_WatchLogsServer) error
WatchLogs Function
func (*LogService) WatchMessages ¶
func (ls *LogService) WatchMessages(req *pb.RequestMessage, svr pb.LogService_WatchMessagesServer) error
WatchMessages Function
type RelayServer ¶
type RelayServer struct { // port Port string // gRPC listener Listener net.Listener // log server LogServer *grpc.Server // wait group WgServer sync.WaitGroup // ELK adapter ELKClient *elasticsearch.ElasticsearchClient }
RelayServer Structure
func (*RelayServer) AddAlertFromBuffChan ¶
func (rs *RelayServer) AddAlertFromBuffChan()
AddAlertFromBuffChan Adds Alert from AlertBufferChannel into AlertStructs
func (*RelayServer) AddLogFromBuffChan ¶
func (rs *RelayServer) AddLogFromBuffChan()
AddLogFromBuffChan Adds Log from LogBufferChannel into LogStructs
func (*RelayServer) AddMsgFromBuffChan ¶
func (rs *RelayServer) AddMsgFromBuffChan()
AddMsgFromBuffChan Adds Msg from MsgBufferChannel into MsgStructs
func (*RelayServer) DestroyRelayServer ¶
func (rs *RelayServer) DestroyRelayServer() error
DestroyRelayServer Function
func (*RelayServer) GetFeedsFromNodes ¶
func (rs *RelayServer) GetFeedsFromNodes()
GetFeedsFromNodes Function