Versions in this module Expand all Collapse all v0 v0.7.6 Jun 15, 2024 Changes in this version + const ChSize + const ModelUpdateStr + const PtyDataUpdateStr + func GetUpdateItems[I ModelUpdateItem](upk *ModelUpdatePacketType) []*I + type Bus struct + Channels map[string]Channel[I] + Lock *sync.Mutex + func (bus *Bus[I]) RegisterChannel(key string, channelEntry Channel[I]) chan I + func (bus *Bus[I]) UnregisterChannel(key string) + type Channel interface + GetChannel func() chan I + Match func(string) bool + SetChannel func(chan I) + type CleanableUpdateItem interface + Clean func() + type ModelUpdate []ModelUpdateItem + func (mu *ModelUpdate) IsEmpty() bool + func (mu *ModelUpdate) MarshalJSON() ([]byte, error) + type ModelUpdateChannel struct + ClientId string + ScreenId string + func (sch *ModelUpdateChannel[J]) Match(screenId string) bool + func (uch *ModelUpdateChannel[J]) GetChannel() chan J + func (uch *ModelUpdateChannel[J]) SetChannel(ch chan J) + type ModelUpdateItem interface + GetType func() string + type ModelUpdatePacketType struct + Data *ModelUpdate + Type string + func MakeUpdatePacket() *ModelUpdatePacketType + func (*ModelUpdatePacketType) GetType() string + func (upk *ModelUpdatePacketType) AddUpdate(items ...ModelUpdateItem) + func (upk *ModelUpdatePacketType) Clean() + func (upk *ModelUpdatePacketType) IsEmpty() bool + func (upk *ModelUpdatePacketType) Merge(p2Arg UpdatePacket) error + type PtyDataUpdate struct + LineId string + PtyData64 string + PtyDataLen int64 + PtyPos int64 + RemoteId string + ScreenId string + type PtyDataUpdatePacketType struct + Data *PtyDataUpdate + Type string + func MakePtyDataUpdate(update *PtyDataUpdate) *PtyDataUpdatePacketType + func (*PtyDataUpdatePacketType) GetType() string + func (pdu *PtyDataUpdatePacketType) Clean() + func (pdu *PtyDataUpdatePacketType) IsEmpty() bool + type RpcBus struct + var MainRpcBus *RpcBus = MakeRpcBus() + func MakeRpcBus() *RpcBus + func (bus *RpcBus) DoRpc(ctx context.Context, pk RpcPacket) (RpcResponse, error) + func (bus *RpcBus) GetRpcChannel(id string) (chan RpcResponse, bool) + type RpcChannel struct + func (ch *RpcChannel) GetChannel() chan RpcResponse + func (ch *RpcChannel) Match(string) bool + func (ch *RpcChannel) SetChannel(newCh chan RpcResponse) + type RpcPacket interface + GetType func() string + SetReqId func(string) + SetTimeoutMs func(int) + type RpcResponse interface + GetError func() string + GetType func() string + SetError func(string) + type UpdateBus struct + var MainUpdateBus *UpdateBus = MakeUpdateBus() + func MakeUpdateBus() *UpdateBus + func (bus *UpdateBus) DoScreenUpdate(screenId string, update UpdatePacket) + func (bus *UpdateBus) DoUpdate(update UpdatePacket) + func (bus *UpdateBus) GetLock() *sync.Mutex + type UpdateChannel struct + ScreenId string + func (sch *UpdateChannel) Match(screenId string) bool + func (uch *UpdateChannel) GetChannel() chan UpdatePacket + func (uch *UpdateChannel) SetChannel(ch chan UpdatePacket) + type UpdatePacket interface + Clean func() + GetType func() string + IsEmpty func() bool