usersessions

package
v0.0.0-...-7f64411 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package usersessions holds model related to the user sessions resolver

Package usersessions holds model related to the user sessions resolver

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrepareK8SUserSessionContext

func PrepareK8SUserSessionContext(userInfo *authenticationv1.UserInfo, cwsUserSessionDataMaxSize int) ([]byte, error)

PrepareK8SUserSessionContext prepares the input parameters forwarded to cws-instrumentation

Types

type Resolver

type Resolver struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Resolver is used to resolve the user sessions context

func NewResolver

func NewResolver(cacheSize int) (*Resolver, error)

NewResolver returns a new instance of Resolver

func (*Resolver) ResolveUserSession

func (r *Resolver) ResolveUserSession(id uint64) *model.UserSessionContext

ResolveUserSession returns the user session associated to the provided ID

func (*Resolver) Start

func (r *Resolver) Start(manager *manager.Manager) error

Start initializes the eBPF map of the resolver

type UserSessionData

type UserSessionData struct {
	SessionType usersession.Type
	RawData     string
}

UserSessionData stores user session context data retrieved from the kernel

func (*UserSessionData) UnmarshalBinary

func (e *UserSessionData) UnmarshalBinary(data []byte) error

UnmarshalBinary unmarshalls a binary representation of itself

type UserSessionKey

type UserSessionKey struct {
	ID      uint64
	Cursor  byte
	Padding [7]byte
}

UserSessionKey describes the key to a user session

Jump to

Keyboard shortcuts

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