Documentation ¶
Index ¶
- func Accept[T ~string](s T, allowed ...T) bool
- func Deny[T ~string](s T, denied ...T) bool
- func First[T any](ts []*T, walk func(*T) []*T, pred func(*T) bool) *T
- func Focused(ws []ipc.Workspace) *ipc.Workspace
- func NewPrefixLogger(prefix string, logch LogChannel) *prefixLogger
- type BasicBlock
- type BlockFactory
- type BlockInitializer
- type BlockRegistry
- type BlockRunnerCloser
- type Client
- type DuplicateKeyError
- type LogChannel
- type LogLevel
- type LogMessage
- type Logger
- type Options
- type PrefixLogMessage
- type Receiver
- type Runner
- type ServerControlChannel
- type ServerControlRequest
- type Sub
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPrefixLogger ¶
func NewPrefixLogger(prefix string, logch LogChannel) *prefixLogger
Types ¶
type BasicBlock ¶
type BlockFactory ¶
type BlockFactory func() BlockInitializer
type BlockInitializer ¶
type BlockRegistry ¶
type BlockRegistry map[string]BlockFactory
var Blocks BlockRegistry
func (BlockRegistry) Register ¶
func (r BlockRegistry) Register(key string, factory BlockFactory) error
type BlockRunnerCloser ¶
type BlockRunnerCloser interface { BlockInitializer Runner io.Closer }
type Client ¶
type Client interface { Command(cmd string) ([]ipc.Command, error) CommandRaw(cmd string) (string, error) Workspaces() ([]ipc.Workspace, error) WorkspacesRaw() (string, error) Tree() (*ipc.Node, error) TreeRaw() (string, error) Version() (*ipc.Version, error) VersionRaw() (string, error) }
Client exports a limited set of methods for use by core.Block instances.
type DuplicateKeyError ¶
type DuplicateKeyError struct {
// contains filtered or unexported fields
}
func (*DuplicateKeyError) Error ¶
func (e *DuplicateKeyError) Error() string
type LogChannel ¶
type LogChannel chan<- LogMessage
type LogMessage ¶
type Options ¶
type Options struct {
Server ServerControlChannel
}
Options are shared options for use by core.Block instances. Use the Log channel to send log data back to the daemon.
type PrefixLogMessage ¶
type PrefixLogMessage struct {
// contains filtered or unexported fields
}
func (PrefixLogMessage) Level ¶
func (lm PrefixLogMessage) Level() LogLevel
func (PrefixLogMessage) String ¶
func (lm PrefixLogMessage) String() string
type ServerControlChannel ¶
type ServerControlChannel chan<- ServerControlRequest
func (ServerControlChannel) RequestExit ¶
func (scc ServerControlChannel) RequestExit()
func (ServerControlChannel) RequestReload ¶
func (scc ServerControlChannel) RequestReload()
type ServerControlRequest ¶
type ServerControlRequest int8
const ( ReloadRequest ServerControlRequest = 0 ExitRequest ServerControlRequest = 1 )
type Sub ¶
type Sub interface { WorkspaceChanges(func(ipc.WorkspaceChange)) (ipc.Cookie, error) WindowChanges(func(ipc.WindowChange)) (ipc.Cookie, error) BindingChanges(func(ipc.BindingChange)) (ipc.Cookie, error) ModeChanges(func(ipc.ModeChange)) (ipc.Cookie, error) ShutdownChanges(func(ipc.ShutdownChange)) (ipc.Cookie, error) Ticks(func(ipc.Tick)) (ipc.Cookie, error) }
Sub exports a limited set of methods for use by core.Block instances.
Click to show internal directories.
Click to hide internal directories.