debugging_runtime

package
v0.0.0-...-e06565c Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2025 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONNECTION_KEY_MANAGER_KEY2ID_PREFIX = "{remote:key:manager}:key2id"
	CONNECTION_KEY_MANAGER_ID2KEY_PREFIX = "{remote:key:manager}:id2key"
	CONNECTION_KEY_LOCK                  = "connection_lock"
	CONNECTION_KEY_EXPIRE_TIME           = time.Minute * 120 // 2 hours
)

Variables

This section is empty.

Functions

func ClearConnectionKey

func ClearConnectionKey(tenant_id string) error

clear connection key

func GetConnectionKey

func GetConnectionKey(info ConnectionInfo) (string, error)

returns a random string, create it if not exists

Types

type ConnectionInfo

type ConnectionInfo struct {
	TenantId string `json:"tenant_id" validate:"required"`
}

func GetConnectionInfo

func GetConnectionInfo(key string) (*ConnectionInfo, error)

get connection info by key

type DifyServer

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

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)

type Key

type Key struct {
	Key string `json:"key" validate:"required"`
}

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) Cleanup

func (r *RemotePluginRuntime) Cleanup()

func (*RemotePluginRuntime) Identity

func (*RemotePluginRuntime) InitEnvironment

func (r *RemotePluginRuntime) InitEnvironment() error

func (*RemotePluginRuntime) Listen

func (*RemotePluginRuntime) Register

func (plugin *RemotePluginRuntime) Register() error

func (*RemotePluginRuntime) StartPlugin

func (r *RemotePluginRuntime) StartPlugin() error

func (*RemotePluginRuntime) Stop

func (r *RemotePluginRuntime) Stop()

func (*RemotePluginRuntime) Stopped

func (r *RemotePluginRuntime) Stopped() bool

func (*RemotePluginRuntime) Type

func (*RemotePluginRuntime) Unregister

func (plugin *RemotePluginRuntime) Unregister() error

func (*RemotePluginRuntime) Wait

func (r *RemotePluginRuntime) Wait() (<-chan bool, error)

func (*RemotePluginRuntime) WaitStarted

func (r *RemotePluginRuntime) WaitStarted() <-chan bool

func (*RemotePluginRuntime) WaitStopped

func (r *RemotePluginRuntime) WaitStopped() <-chan bool

func (*RemotePluginRuntime) Write

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

type RemotePluginServer

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

func NewRemotePluginServer

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

NewRemotePluginServer creates a new RemotePluginServer

func (*RemotePluginServer) Launch

func (r *RemotePluginServer) Launch() error

Launch starts the server

func (*RemotePluginServer) Next

func (r *RemotePluginServer) Next() bool

Next returns true if there are more connections to be read

func (*RemotePluginServer) Read

continue accepting new connections

func (*RemotePluginServer) Stop

func (r *RemotePluginServer) Stop() error

Stop stops the server

func (*RemotePluginServer) Wrap

Wrap wraps the wrap method of stream response

type RemotePluginServerInterface

type RemotePluginServerInterface interface {
	Read() (plugin_entities.PluginFullDuplexLifetime, error)
	Next() bool
	Wrap(f func(plugin_entities.PluginFullDuplexLifetime))
	Stop() error
	Launch() error
}

Jump to

Keyboard shortcuts

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