usergroup

package
v0.0.0-...-00ecffe Latest Latest
Warning

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

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

Documentation

Overview

Package usergroup holds usergroup related files

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntryCache

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

EntryCache maps ids to names

type Resolver

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

Resolver resolves user and group ids to names

func NewResolver

func NewResolver(cgroupResolver *cgroup.Resolver) (*Resolver, error)

NewResolver instantiates a new user and group resolver

func (*Resolver) OnCGroupDeletedEvent

func (r *Resolver) OnCGroupDeletedEvent(sbom *cgroupModel.CacheEntry)

OnCGroupDeletedEvent is used to handle a CGroupDeleted event

func (*Resolver) RefreshCache

func (r *Resolver) RefreshCache(containerID containerutils.ContainerID) error

RefreshCache refresh the user and group caches with data from files

func (*Resolver) ResolveGroup

func (r *Resolver) ResolveGroup(gid int, containerID containerutils.ContainerID) (string, error)

ResolveGroup resolves a group id to a group name

func (*Resolver) ResolveUser

func (r *Resolver) ResolveUser(uid int, containerID containerutils.ContainerID) (string, error)

ResolveUser resolves a user id to a username

Jump to

Keyboard shortcuts

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