gc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SafePointManager

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

SafePointManager is the manager for safePoint of GC and services.

func NewSafePointManager

func NewSafePointManager(store endpoint.GCSafePointStorage) *SafePointManager

NewSafePointManager creates a SafePointManager of GC and services.

func (*SafePointManager) LoadGCSafePoint

func (manager *SafePointManager) LoadGCSafePoint() (uint64, error)

LoadGCSafePoint loads current GC safe point from storage.

func (*SafePointManager) UpdateGCSafePoint

func (manager *SafePointManager) UpdateGCSafePoint(newSafePoint uint64) (oldSafePoint uint64, err error)

UpdateGCSafePoint updates the safepoint if it is greater than the previous one it returns the old safepoint in the storage.

func (*SafePointManager) UpdateServiceGCSafePoint

func (manager *SafePointManager) UpdateServiceGCSafePoint(serviceID string, newSafePoint uint64, ttl int64, now time.Time) (minServiceSafePoint *endpoint.ServiceSafePoint, updated bool, err error)

UpdateServiceGCSafePoint update the safepoint for a specific service.

Jump to

Keyboard shortcuts

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