textboard

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: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	GetText(ctx context.Context) ([]string, error)
	HTTPPathPrefix() string
}

API ...

type Config

type Config struct {
	StartEnabled       *atomic.Bool `json:"enabled"`
	BoardDelay         string       `json:"boardDelay"`
	UpdateInterval     string       `json:"updateInterval"`
	TightScrollPadding int          `json:"tightScrollPadding"`
	ScrollDelay        string       `json:"scrollDelay"`
	OnTimes            []string     `json:"onTimes"`
	OffTimes           []string     `json:"offTimes"`
	UseLogos           *atomic.Bool `json:"useLogos"`
	Max                *int         `json:"max"`
	// contains filtered or unexported fields
}

Config for a TextBoard

func (*Config) SetDefaults

func (c *Config) SetDefaults()

SetDefaults ...

type OptionFunc

type OptionFunc func(*TextBoard) error

OptionFunc ...

func WithHalfSizeLogo() OptionFunc

WithHalfSizeLogo option to shrink headline logo by half

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 ...

type TextBoard

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

TextBoard displays stocks

func New

func New(api API, config *Config, log *zap.Logger, opts ...OptionFunc) (*TextBoard, error)

New ...

func (*TextBoard) Enabler

func (s *TextBoard) Enabler() board.Enabler

func (*TextBoard) GetHTTPHandlers

func (s *TextBoard) GetHTTPHandlers() ([]*board.HTTPHandler, error)

GetHTTPHandlers ...

func (*TextBoard) GetRPCHandler

func (s *TextBoard) GetRPCHandler() (string, http.Handler)

GetRPCHandler ...

func (*TextBoard) InBetween

func (s *TextBoard) InBetween() bool

InBetween ...

func (*TextBoard) Name

func (s *TextBoard) Name() string

Name ...

func (*TextBoard) Render

func (s *TextBoard) Render(ctx context.Context, canvas board.Canvas) error

Render ...

func (*TextBoard) ScrollMode

func (s *TextBoard) ScrollMode() bool

ScrollMode ...

func (*TextBoard) ScrollRender

func (s *TextBoard) ScrollRender(ctx context.Context, canvas board.Canvas, padding int) (board.Canvas, error)

ScrollRender ...

Jump to

Keyboard shortcuts

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