debugging_runtime

package
v0.0.0-...-f272e6c Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DifyServer

type DifyServer struct {
	gnet.BuiltinEventEngine
	// contains filtered or unexported fields
}

func (*DifyServer) AddNotifier

func (r *DifyServer) AddNotifier(notifier PluginRuntimeNotifier)

AddNotifier adds a notifier to the runtime

func (*DifyServer) OnBoot

func (s *DifyServer) OnBoot(c gnet.Engine) (action gnet.Action)

func (*DifyServer) OnClose

func (s *DifyServer) OnClose(c gnet.Conn, err error) (action gnet.Action)

func (*DifyServer) OnOpen

func (s *DifyServer) OnOpen(c gnet.Conn) (out []byte, action gnet.Action)

func (*DifyServer) OnShutdown

func (s *DifyServer) OnShutdown(c gnet.Engine)

func (*DifyServer) OnTraffic

func (s *DifyServer) OnTraffic(c gnet.Conn) (action gnet.Action)

func (*DifyServer) WalkNotifiers

func (r *DifyServer) WalkNotifiers(fn func(notifier PluginRuntimeNotifier))

WalkNotifiers walks through all the notifiers and calls the given function

type GnetLogger

type GnetLogger struct{}

GnetLogger is a logger implementation for gnet that uses the custom log package

It implements the gnet.logging.Logger interface See: https://pkg.go.dev/github.com/panjf2000/gnet/v2#WithLogger

Gnet uses format strings for logging, but our custom log package uses structured logging reformat it using fmt.Sprintf here as a bridge

func (GnetLogger) Debugf

func (l GnetLogger) Debugf(format string, args ...any)

func (GnetLogger) Errorf

func (l GnetLogger) Errorf(format string, args ...any)

func (GnetLogger) Fatalf

func (l GnetLogger) Fatalf(format string, args ...any)

func (GnetLogger) Infof

func (l GnetLogger) Infof(format string, args ...any)

func (GnetLogger) Printf

func (l GnetLogger) Printf(format string, args ...any) string

func (GnetLogger) Warnf

func (l GnetLogger) Warnf(format string, args ...any)

type PluginRuntimeNotifier

type PluginRuntimeNotifier interface {
	// on runtime connected
	OnRuntimeConnected(*RemotePluginRuntime) error

	// on runtime disconnected
	OnRuntimeDisconnected(*RemotePluginRuntime)

	// on server shutdown
	OnServerShutdown(reason ServerShutdownReason)
}

type RemotePluginRuntime

type RemotePluginRuntime struct {
	basic_runtime.MediaTransport
	plugin_entities.PluginRuntime
	// contains filtered or unexported fields
}

func (*RemotePluginRuntime) Checksum

func (r *RemotePluginRuntime) Checksum() (string, error)

func (*RemotePluginRuntime) HeartbeatMonitor

func (r *RemotePluginRuntime) HeartbeatMonitor()

func (*RemotePluginRuntime) Identity

func (*RemotePluginRuntime) InstallationId

func (r *RemotePluginRuntime) InstallationId() string

func (*RemotePluginRuntime) Listen

func (*RemotePluginRuntime) SetInstallationId

func (r *RemotePluginRuntime) SetInstallationId(installationId string)

func (*RemotePluginRuntime) SpawnCore

func (r *RemotePluginRuntime) SpawnCore() error

spawn a core to handle CPU-intensive tasks

func (*RemotePluginRuntime) Stop

func (r *RemotePluginRuntime) Stop()

func (*RemotePluginRuntime) Stopped

func (r *RemotePluginRuntime) Stopped() bool

func (*RemotePluginRuntime) TenantId

func (r *RemotePluginRuntime) TenantId() string

func (*RemotePluginRuntime) Type

func (*RemotePluginRuntime) Write

func (r *RemotePluginRuntime) Write(
	sessionId string,
	action access_types.PluginAccessAction,
	data []byte,
) error

type RemotePluginServer

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

func NewDebuggingPluginServer

func NewDebuggingPluginServer(
	config *app.Config, media_transport *media_transport.MediaBucket,
) *RemotePluginServer

NewDebuggingPluginServer creates a new RemotePluginServer

func (*RemotePluginServer) AddNotifier

func (r *RemotePluginServer) AddNotifier(notifier PluginRuntimeNotifier)

AddNotifier adds a notifier to the runtime

func (*RemotePluginServer) Launch

func (r *RemotePluginServer) Launch() error

Launch starts the server

func (*RemotePluginServer) Stop

func (r *RemotePluginServer) Stop() error

Stop stops the server

func (*RemotePluginServer) WalkNotifiers

func (r *RemotePluginServer) WalkNotifiers(fn func(notifier PluginRuntimeNotifier))

WalkNotifiers walks through all the notifiers and calls the given function

type RemotePluginServerInterface

type RemotePluginServerInterface interface {
	Stop() error
	Launch() error
}

type ServerShutdownReason

type ServerShutdownReason string
const (
	SERVER_SHUTDOWN_REASON_EXIT  ServerShutdownReason = "exit"
	SERVER_SHUTDOWN_REASON_ERROR ServerShutdownReason = "error"
)

Jump to

Keyboard shortcuts

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