ipc

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecutorType

type ExecutorType string
const (
	ExecutorTypeThread  ExecutorType = "thread"
	ExecutorTypeProcess ExecutorType = "process"
)

type Exiting

type Exiting struct {
	Reason string `json:"reason"`
}

type InitializeRequest

type InitializeRequest struct {
	AsyncioDebug      bool    `json:"asyncio_debug"`
	PingInterval      float64 `json:"ping_interval"`
	PingTimeout       float64 `json:"ping_timeout"`
	HighPingThreshold float64 `json:"high_ping_threshold"`
}

type InitializeResponse

type InitializeResponse struct {
	Error string `json:"error,omitempty"`
}

type JobExecutor

type JobExecutor interface {
	ID() string
	Status() JobStatus
	Started() bool
	LaunchJob(ctx context.Context, job *livekit.Job) error
	Close(ctx context.Context) error
}

type JobStatus

type JobStatus string
const (
	JobStatusRunning JobStatus = "running"
	JobStatusFailed  JobStatus = "failed"
	JobStatusSuccess JobStatus = "success"
)

type Message

type Message struct {
	Type    MessageType     `json:"type"`
	Payload json.RawMessage `json:"payload,omitempty"`
}

type MessageType

type MessageType string
const (
	MessageTypeInitializeRequest  MessageType = "initialize_request"
	MessageTypeInitializeResponse MessageType = "initialize_response"
	MessageTypePingRequest        MessageType = "ping_request"
	MessageTypePongResponse       MessageType = "pong_response"
	MessageTypeStartJobRequest    MessageType = "start_job_request"
	MessageTypeShutdownRequest    MessageType = "shutdown_request"
	MessageTypeExiting            MessageType = "exiting"
)

type PingRequest

type PingRequest struct {
	Timestamp int64 `json:"timestamp"`
}

type PongResponse

type PongResponse struct {
	LastTimestamp int64 `json:"last_timestamp"`
	Timestamp     int64 `json:"timestamp"`
}

type ProcPool

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

func NewProcPool

func NewProcPool(maxProcesses int, executorType ExecutorType, entrypoint func() error) *ProcPool

func (*ProcPool) Close

func (p *ProcPool) Close() error

func (*ProcPool) GetExecutors

func (p *ProcPool) GetExecutors() []JobExecutor

func (*ProcPool) LaunchJob

func (p *ProcPool) LaunchJob(ctx context.Context, job *livekit.Job) error

type ProcessJobExecutor

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

func NewProcessJobExecutor

func NewProcessJobExecutor(id string) *ProcessJobExecutor

func (*ProcessJobExecutor) Close

func (e *ProcessJobExecutor) Close(ctx context.Context) error

func (*ProcessJobExecutor) ID

func (e *ProcessJobExecutor) ID() string

func (*ProcessJobExecutor) LaunchJob

func (e *ProcessJobExecutor) LaunchJob(ctx context.Context, job *livekit.Job) error

func (*ProcessJobExecutor) Started

func (e *ProcessJobExecutor) Started() bool

func (*ProcessJobExecutor) Status

func (e *ProcessJobExecutor) Status() JobStatus

type ShutdownRequest

type ShutdownRequest struct {
	Reason string `json:"reason"`
}

type StartJobRequest

type StartJobRequest struct {
	Job *livekit.Job `json:"job"`
}

type ThreadJobExecutor

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

func NewThreadJobExecutor

func NewThreadJobExecutor(id string, entrypoint func() error) *ThreadJobExecutor

func (*ThreadJobExecutor) Close

func (e *ThreadJobExecutor) Close(ctx context.Context) error

func (*ThreadJobExecutor) ID

func (e *ThreadJobExecutor) ID() string

func (*ThreadJobExecutor) LaunchJob

func (e *ThreadJobExecutor) LaunchJob(ctx context.Context, job *livekit.Job) error

func (*ThreadJobExecutor) Started

func (e *ThreadJobExecutor) Started() bool

func (*ThreadJobExecutor) Status

func (e *ThreadJobExecutor) Status() JobStatus

Jump to

Keyboard shortcuts

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