Skip to content
github-actions[bot] edited this page Apr 20, 2025 · 7 revisions

ipc

import "github.com/AarC10/GSW-V2/lib/ipc"

Index

type Reader

Reader is an interface for receiving data across processes

type Reader interface {
    Read() ([]byte, error)
    Cleanup()
}

ShmHandler is a shared memory handler for inter-process communication

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

func CreateShmHandler(identifier string, size int, isWriter bool) (*ShmHandler, error)

CreateShmHandler creates a shared memory handler for inter-process communication

func CreateShmReader(identifier string) (*ShmHandler, error)

CreateShmReader creates a shared memory reader for inter-process communication

func (*ShmHandler) Cleanup

func (handler *ShmHandler) Cleanup()

Cleanup cleans up the shared memory handler and removes the shared memory file

func (*ShmHandler) LastUpdate

func (handler *ShmHandler) LastUpdate() time.Time

LastUpdate returns the last update time of the shared memory

func (*ShmHandler) Read

func (handler *ShmHandler) Read() ([]byte, error)

Read reads data from shared memory

func (*ShmHandler) ReadNoTimestamp

func (handler *ShmHandler) ReadNoTimestamp() ([]byte, error)

ReadNoTimestamp reads data from shared memory without the timestamp

func (*ShmHandler) Write

func (handler *ShmHandler) Write(data []byte) error

Write writes data to shared memory

type Writer

Writer is an interface for sending data across processes

type Writer interface {
    Write(data []byte) error
    Cleanup()
}

Generated by gomarkdoc

Clone this wiki locally