service

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: Apache-2.0 Imports: 20 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	ClientID string `json:"client_id"`
	jwt.RegisteredClaims
}

Claims represents JWT token claims

type MetricCollector

type MetricCollector struct {
	UserSchedLastRunAtMetric *prometheus.Desc
	NrQueuedMetric           *prometheus.Desc
	NrScheduledMetric        *prometheus.Desc
	NrRunningMetric          *prometheus.Desc
	NrOnlineCPUsMetric       *prometheus.Desc
	NrUserDispatchesMetric   *prometheus.Desc
	NrKernelDispatchesMetric *prometheus.Desc
	NrCancelDispatchesMetric *prometheus.Desc
	NrBounceDispatchesMetric *prometheus.Desc
	NrFailedDispatchesMetric *prometheus.Desc
	NrSchedCongestedMetric   *prometheus.Desc
	// contains filtered or unexported fields
}

MetricCollector

func NewMetricCollector

func NewMetricCollector(machineID string) *MetricCollector

// NewMetricCollector creates a new MetricCollector for a specific game server.

func (*MetricCollector) Collect

func (collector *MetricCollector) Collect(ch chan<- prometheus.Metric)

Collect is called by the Prometheus registry when collecting metrics.

func (*MetricCollector) Describe

func (collector *MetricCollector) Describe(ch chan<- *prometheus.Desc)

Describe sends the super-set of all possible descriptors of metrics

func (*MetricCollector) UpdateMetrics

func (collector *MetricCollector) UpdateMetrics(newMetricSet *domain.MetricSet)

type Node added in v1.2.0

type Node struct {
	Hash  string
	Left  *Node
	Right *Node
}

type Params

type Params struct {
	fx.In
	TokenConfig config.TokenConfig
}

type Service

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

func NewService

func NewService(params Params) (*Service, error)

func (*Service) DeleteAllIntents added in v1.1.0

func (svc *Service) DeleteAllIntents(ctx context.Context) error

DeleteAllIntents clears all scheduling intents

func (*Service) DeleteIntentByPID added in v1.1.0

func (svc *Service) DeleteIntentByPID(ctx context.Context, podID string, pid int) error

DeleteIntentByPID deletes a specific scheduling intent by pod ID and PID

func (*Service) DeleteIntentByPodID added in v1.1.0

func (svc *Service) DeleteIntentByPodID(ctx context.Context, podID string) error

DeleteIntentByPodID deletes all scheduling intents for a specific pod ID

func (*Service) FindPodInfoFrom

func (svc *Service) FindPodInfoFrom(ctx context.Context, rootDir string) (map[string]*domain.PodInfo, error)

FindPodInfoFrom scans the given rootDir (e.g., /proc) to find pod information

func (*Service) GetAllPodInfos

func (svc *Service) GetAllPodInfos(ctx context.Context) (map[string]*domain.PodInfo, error)

GetAllPodInfos retrieves all pod information by scanning the /proc filesystem

func (*Service) ListAllSchedulingIntents

func (svc *Service) ListAllSchedulingIntents(ctx context.Context) ([]*domain.SchedulingIntents, error)

ListAllSchedulingIntents re-scans /proc and recalculates scheduling intents from the cached domain.Intent list, since pod processes may change over time.

func (*Service) ProcessIntents

func (svc *Service) ProcessIntents(ctx context.Context, intents []*domain.Intent) error

ProcessIntents processes a list of scheduling intents and updates the internal map

func (*Service) TraverseIntentMerkleTree added in v1.2.0

func (svc *Service) TraverseIntentMerkleTree(ctx context.Context, req *TraverseIntentMerkleTreeOptions) (resp *TraverseIntentMerkleTreeResp, err error)

func (*Service) UpdateMetrics

func (svc *Service) UpdateMetrics(ctx context.Context, newMetricSet *domain.MetricSet)

func (*Service) VerifyAndGenerateToken

func (svc *Service) VerifyAndGenerateToken(ctx context.Context, clientID string, publicKey string) (string, int64, error)

VerifyAndGenerateToken verifies the provided public key and generates a JWT token if valid

func (*Service) VerifyPublicKey

func (svc *Service) VerifyPublicKey(publicKeyPEM string) error

verifyPublicKey verifies if the provided public key matches our private key

type TraverseIntentMerkleTreeOptions added in v1.2.0

type TraverseIntentMerkleTreeOptions struct {
	RootHash string
	Depth    int64
}

type TraverseIntentMerkleTreeResp added in v1.2.0

type TraverseIntentMerkleTreeResp struct {
	RootNode *Node
}

Jump to

Keyboard shortcuts

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