Help us shape the future of Go! Take the 2026 Go Developer Survey

controller

package
v2.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 64 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultGCMinAge = 24 * time.Hour

DefaultGCMinAge is how old an orphaned object must be before gc touches it. a day is well clear of clock skew between the ziti and zrok hosts, and with the leak stopped nothing younger needs reclaiming. any guard at all also keeps gc off a share whose ziti objects are allocated but whose row has not yet committed is never collected.

View Source
const DefaultRepairStoreBatch = 500

DefaultRepairStoreBatch is how many rows one repair transaction touches, small enough that no batch holds a long transaction on the store.

Variables

This section is empty.

Functions

func Bootstrap

func Bootstrap(skipFrontend bool, inCfg *config.Config) error

func CreateToken

func CreateToken() (string, error)

func GC

func GC(inCfg *zrok_config.Config, opts GCOptions) error

GC reports, and with opts.Delete removes, the ziti objects carrying a zrokShareToken tag whose token belongs to no live share.

func HashPassword

func HashPassword(password string) (*hashedPassword, error)

func HealthCheckHTTP

func HealthCheckHTTP(w http.ResponseWriter, _ *http.Request)

func RepairDialPolicies added in v2.0.7

func RepairDialPolicies(cfg *zrok_config.Config, apply bool) error

RepairDialPolicies reports, and with apply creates, the dial service policies missing from live shares whose accounts the bandwidth limit journal does not hold limited.

func RepairStore added in v2.0.8

func RepairStore(inCfg *zrok_config.Config, opts RepairStoreOptions) error

RepairStore reports, and with opts.Apply repairs, the store rows a teardown would have released had it run: stranded environments and shares, access frontends of deleted shares, names of deleted accounts, unmapped allocated names, and share name and frontend mappings of deleted shares and names. it touches the store only: no ziti calls and no frontend notifications.

func Run

func Run(inCfg *config.Config) error

func Unbootstrap

func Unbootstrap(cfg *config.Config) error

Types

type GCOptions added in v2.0.7

type GCOptions struct {
	// Delete removes the orphaned objects; without it gc only reports.
	Delete bool
	// MinAge skips orphaned objects younger than this by their createdAt.
	MinAge time.Duration
	// contains filtered or unexported fields
}

type RepairStoreOptions added in v2.0.8

type RepairStoreOptions struct {
	// Apply repairs the rows; without it the sweep only reports.
	Apply bool
	// Batch is how many rows each repair transaction touches.
	Batch int
}

Source Files

Jump to

Keyboard shortcuts

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