cluster

package
v0.0.0-...-b112479 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

AuthZProvider is the authz registry for Notebooks, Shells, and Commands.

Functions

func CanGetUsageDetails

func CanGetUsageDetails() echo.MiddlewareFunc

CanGetUsageDetails returns an echo middleware that checks if the user has permission to get usage details.

func InitTheLastBootClusterHeartbeat

func InitTheLastBootClusterHeartbeat()

InitTheLastBootClusterHeartbeat preserves the last boot heartbeat for applications that need it after the master has been running for some time (e.g. open allocation reattachment).

func TheLastBootClusterHeartbeat

func TheLastBootClusterHeartbeat() *time.Time

TheLastBootClusterHeartbeat returns the last known heartbeat time from the previous master boot.

Types

type MiscAuthZ

type MiscAuthZ interface {

	// CanUpdateAgents returns an error if the user is not authorized to manipulate agents.
	CanUpdateAgents(
		ctx context.Context, curUser *model.User,
	) (permErr error, err error)

	// CanGetMasterLogs returns an error if the user is not authorized to get master logs.
	CanGetMasterLogs(
		ctx context.Context, curUser *model.User,
	) (permErr error, err error)

	// CanGetHistoricalUsage returns an error if the user is not authorized to get usage
	// related information.
	CanGetUsageDetails(
		ctx context.Context, curUser *model.User,
	) (permErr error, err error)
}

MiscAuthZ describes authz methods for misc actions.

type MiscAuthZBasic

type MiscAuthZBasic struct{}

MiscAuthZBasic is basic OSS controls.

func (*MiscAuthZBasic) CanGetMasterLogs

func (a *MiscAuthZBasic) CanGetMasterLogs(
	ctx context.Context, curUser *model.User,
) (permErr error, err error)

CanGetMasterLogs returns nil and nil error.

func (*MiscAuthZBasic) CanGetUsageDetails

func (a *MiscAuthZBasic) CanGetUsageDetails(
	ctx context.Context, curUser *model.User,
) (permErr error, err error)

CanGetUsageDetails returns nil and nil error.

func (*MiscAuthZBasic) CanUpdateAgents

func (a *MiscAuthZBasic) CanUpdateAgents(
	ctx context.Context, curUser *model.User,
) (permErr error, err error)

CanUpdateAgents checks if the user has access to update agents.

Jump to

Keyboard shortcuts

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