service

package
v0.0.0-...-242787d Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package service provides the core business logic

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventCallback

type EventCallback func(event string, data interface{})

EventCallback is called when state changes

type LowerConn

type LowerConn struct {
	PortPath string
	PortType string // "virtual" or "physical"
	Conn     transport.Transport
}

LowerConn represents a lower port connection

type Service

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

Service provides the core recording and comparison functionality

func NewService

func NewService() *Service

NewService creates a new service

func (*Service) Clear

func (s *Service) Clear() api.State

Clear clears the baseline data (keeps PTYs alive)

func (*Service) GetState

func (s *Service) GetState() api.State

GetState returns the current state

func (*Service) Init

func (s *Service) Init() (api.State, error)

Init initializes the service

func (*Service) RefreshPorts

func (s *Service) RefreshPorts() api.State

RefreshPorts refreshes the port list

func (*Service) SelectLowerPort

func (s *Service) SelectLowerPort(portPath string) api.State

SelectLowerPort selects a lower port for communication

func (*Service) SetBaseline

func (s *Service) SetBaseline(records []api.Record)

SetBaseline sets the baseline data for testing

func (*Service) SetEventCallback

func (s *Service) SetEventCallback(cb EventCallback)

SetEventCallback sets the event callback

func (*Service) StartCompare

func (s *Service) StartCompare() (api.State, error)

StartCompare starts compare mode

func (*Service) StartRecord

func (s *Service) StartRecord() (api.State, error)

StartRecord starts recording mode

func (*Service) Stop

func (s *Service) Stop() api.State

Stop stops the current mode (returns to idle)

Jump to

Keyboard shortcuts

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