ipc

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommandGoaway                = "GOAWAY"
	CommandTransactionVerify     = "TRANSACTION_VERIFY"
	CommandTransactionVerifyDone = "TRANSACTION_VERIFY_DONE"
	CommandGoawayStart           = "GOAWAY_START"
	CommandGoawayDone            = "GOAWAY_DONE"
	CommandCronExecute           = "CRON_EXECUTE"
	DataKeyTransaction           = "transaction"
	DataKeyVerify                = "verify"
	DataKeyJobName               = "job"
	DataKeyJobSample             = "sample"
)

Variables

This section is empty.

Functions

func AsBool

func AsBool(src interface{}) bool

func AsString

func AsString(src interface{}) string

func IsAliveTransaction

func IsAliveTransaction(id string) bool

func IsFatimaIPCAvailable

func IsFatimaIPCAvailable(proc string) bool

func RegisterIPCSessionListener

func RegisterIPCSessionListener(listener FatimaIPCSessionListener)

func StartIPCService

func StartIPCService(fr fatima.FatimaRuntime,
	ps fatima.PlatformSupport,
	goawayImpl fatima.FatimaRuntimeGoaway,
	cronRunner cronRunnableFunc) io.Closer

func StopIPCService

func StopIPCService()

Types

type ConnectionListener

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

func (*ConnectionListener) OnClose

func (g *ConnectionListener) OnClose(ctx SessionContext)

func (*ConnectionListener) OnReceiveCommand

func (g *ConnectionListener) OnReceiveCommand(ctx SessionContext, message Message)

func (*ConnectionListener) StartSession

func (g *ConnectionListener) StartSession(ctx SessionContext)

type CronListener

type CronListener struct {
}

func (*CronListener) OnClose

func (g *CronListener) OnClose(ctx SessionContext)

func (*CronListener) OnReceiveCommand

func (g *CronListener) OnReceiveCommand(ctx SessionContext, message Message)

func (*CronListener) StartSession

func (g *CronListener) StartSession(ctx SessionContext)

type FatimaIPCClientSession

type FatimaIPCClientSession interface {
	SendCommand(Message) error
	ReadCommand() (Message, error)
	Disconnect()
}

func NewFatimaIPCClientSession

func NewFatimaIPCClientSession(proc string) (FatimaIPCClientSession, error)

type FatimaIPCSessionListener

type FatimaIPCSessionListener interface {
	StartSession(ctx SessionContext)
	OnReceiveCommand(ctx SessionContext, message Message)
	OnClose(ctx SessionContext)
}

type GoAwaySessionListener

type GoAwaySessionListener struct {
}

func (*GoAwaySessionListener) OnClose

func (g *GoAwaySessionListener) OnClose(ctx SessionContext)

func (*GoAwaySessionListener) OnReceiveCommand

func (g *GoAwaySessionListener) OnReceiveCommand(ctx SessionContext, message Message)

func (*GoAwaySessionListener) StartSession

func (g *GoAwaySessionListener) StartSession(ctx SessionContext)

type Initiator

type Initiator struct {
	Process string `json:"process"`
	Command string `json:"command"`
	Sock    string `json:"sock"`
}

func (Initiator) String

func (i Initiator) String() string

type JsonBody

type JsonBody map[string]interface{}

func (JsonBody) GetValue

func (j JsonBody) GetValue(findingKey string) interface{}

type Message

type Message struct {
	Initiator Initiator `json:"initiator"`
	Data      JsonBody  `json:"data,omitempty"`
}

func NewMessageCronExecute

func NewMessageCronExecute(jobName, sample string) Message

func NewMessageGoaway

func NewMessageGoaway() Message

func NewMessageGoawayDone

func NewMessageGoawayDone(transactionId string) Message

func NewMessageGoawayStart

func NewMessageGoawayStart(transactionId string) Message

func NewMessageTransactionVerify

func NewMessageTransactionVerify(transactionId string) Message

func NewMessageTransactionVerifyDone

func NewMessageTransactionVerifyDone(transactionId string, result bool) Message

func (Message) GetTransactionId

func (m Message) GetTransactionId() string

func (Message) Is

func (m Message) Is(command string) bool

func (Message) String

func (m Message) String() string

type SessionContext

type SessionContext interface {
	String() string
	Close()
	GetConnection() net.Conn
	SendCommand(message Message) error
}

type SessionEvent

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

type SessionEventType

type SessionEventType uint8
const (
	SessionEventStart SessionEventType = iota
	SessionEventReceiveCommand
	SessionEventClose
)

type SessionType

type SessionType uint8

Jump to

Keyboard shortcuts

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