clock

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Name = "Clock"

Name is the default board name for this Clock

Functions

This section is empty.

Types

type Clock

type Clock struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Clock implements board.Board

func New

func New(config *Config, logger *zap.Logger) (*Clock, error)

New returns a new Clock board

func (*Clock) Cleanup

func (c *Clock) Cleanup()

Cleanup ...

func (*Clock) Enabler

func (c *Clock) Enabler() board.Enabler

func (*Clock) GetHTTPHandlers

func (c *Clock) GetHTTPHandlers() ([]*board.HTTPHandler, error)

GetHTTPHandlers ...

func (*Clock) GetRPCHandler

func (c *Clock) GetRPCHandler() (string, http.Handler)

GetRPCHandler ...

func (*Clock) HasPriority

func (c *Clock) HasPriority() bool

HasPriority ...

func (*Clock) InBetween

func (c *Clock) InBetween() bool

InBetween ...

func (*Clock) Name

func (c *Clock) Name() string

Name ...

func (*Clock) Render

func (c *Clock) Render(ctx context.Context, canvas board.Canvas) error

Render ...

func (*Clock) ScrollMode

func (c *Clock) ScrollMode() bool

ScrollMode ...

type Config

type Config struct {
	StartEnabled *atomic.Bool `json:"enabled"`
	BoardDelay   string       `json:"boardDelay"`
	OnTimes      []string     `json:"onTimes"`
	OffTimes     []string     `json:"offTimes"`
	ShowBetween  *atomic.Bool `json:"showBetween"`
	Enable24Hour *atomic.Bool `json:"enable24Hour"`
	// contains filtered or unexported fields
}

Config is a Clock configuration

func (*Config) SetDefaults

func (c *Config) SetDefaults()

SetDefaults ...

type Server

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

Server ...

func (*Server) GetStatus

func (s *Server) GetStatus(ctx context.Context, req *emptypb.Empty) (*pb.StatusResp, error)

GetStatus ...

func (*Server) SetStatus

func (s *Server) SetStatus(ctx context.Context, req *pb.SetStatusReq) (*emptypb.Empty, error)

SetStatus ...

Jump to

Keyboard shortcuts

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