Documentation
¶
Index ¶
- type Claims
- type MetricCollector
- type Node
- type Params
- type Service
- func (svc *Service) DeleteAllIntents(ctx context.Context) error
- func (svc *Service) DeleteIntentByPID(ctx context.Context, podID string, pid int) error
- func (svc *Service) DeleteIntentByPodID(ctx context.Context, podID string) error
- func (svc *Service) FindPodInfoFrom(ctx context.Context, rootDir string) (map[string]*domain.PodInfo, error)
- func (svc *Service) GetAllPodInfos(ctx context.Context) (map[string]*domain.PodInfo, error)
- func (svc *Service) ListAllSchedulingIntents(ctx context.Context) ([]*domain.SchedulingIntents, error)
- func (svc *Service) ProcessIntents(ctx context.Context, intents []*domain.Intent) error
- func (svc *Service) TraverseIntentMerkleTree(ctx context.Context, req *TraverseIntentMerkleTreeOptions) (resp *TraverseIntentMerkleTreeResp, err error)
- func (svc *Service) UpdateMetrics(ctx context.Context, newMetricSet *domain.MetricSet)
- func (svc *Service) VerifyAndGenerateToken(ctx context.Context, clientID string, publicKey string) (string, int64, error)
- func (svc *Service) VerifyPublicKey(publicKeyPEM string) error
- type TraverseIntentMerkleTreeOptions
- type TraverseIntentMerkleTreeResp
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 Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) DeleteAllIntents ¶ added in v1.1.0
DeleteAllIntents clears all scheduling intents
func (*Service) DeleteIntentByPID ¶ added in v1.1.0
DeleteIntentByPID deletes a specific scheduling intent by pod ID and PID
func (*Service) DeleteIntentByPodID ¶ added in v1.1.0
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 ¶
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 ¶
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 (*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 ¶
verifyPublicKey verifies if the provided public key matches our private key
type TraverseIntentMerkleTreeOptions ¶ added in v1.2.0
type TraverseIntentMerkleTreeResp ¶ added in v1.2.0
type TraverseIntentMerkleTreeResp struct {
RootNode *Node
}