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

bar

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: GPL-3.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRegistry

func NewRegistry(options Options) segment.Registry

func Render

func Render(layout segment.Layout, position segment.Position, context segment.Context) string

func RenderWithin

func RenderWithin(layout segment.Layout, position segment.Position, context segment.Context, cells int) string

Types

type Config

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

func NewConfiguration

func NewConfiguration(registry segment.Registry, layout segment.Layout) Config

func (*Config) GetRegistry

func (self *Config) GetRegistry() segment.Registry

func (*Config) NextRefresh

func (self *Config) NextRefresh(phase segment.Phase) time.Time

func (*Config) Render

func (self *Config) Render(position segment.Position, context segment.Context) string

func (*Config) RenderInfo

func (self *Config) RenderInfo(context segment.Context) (string, error)

func (*Config) RenderWithin

func (self *Config) RenderWithin(position segment.Position, context segment.Context, cells int) string

func (*Config) ReplaceLayout

func (self *Config) ReplaceLayout(layout segment.Layout)

type Options

type Options struct {
	Workspace             *work.Space
	Session               cycle.Session
	ModelEffortLevels     []string
	IsFast                bool
	IsSimulated           bool
	IsUnconfined          bool
	UsageReporter         agent.UsageReporter
	UsageCachePath        string
	UsageIsSelfRefreshing bool
	UsageGauges           *usage.Gauges
	Currency              money.Currency
	SandboxHostname       string
	Sources               Sources
}

type Sources

type Sources struct {
	IsTurnRunning      func() bool
	IsSessionPersisted func() bool
	GetContextUsage    func() (int, int)
	GetCacheUsage      func() (int, int)
	GetSessionSpend    func() (float64, bool)
	GetGrantedCaps     func() caps.Set
	GetGroupStatus     func() caps.GroupStatus
	GetPathGrants      func() []pathgrant.Grant
	GetForwardedRoutes func() []portgrant.Route
	IsPrefixPending    func() bool
	GetTurnTiming      func() turn.Timing
	GetTurnCount       func() int
	GetJobs            func() []jobs.Snapshot
}

Jump to

Keyboard shortcuts

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