echocore

package
v0.0.0-...-2d8c369 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalEchoNetwork *cmap.ConcurrentMap[string, *EchoBus]

Complex map indexing EchoBus by both env and chatspace.

View Source
var GlobalSupportedEnvMap map[string]bool

Functions

func GetChatSpaceByEnv

func GetChatSpaceByEnv(env string) (string, bool)

Function used in test.

func GetClientID

func GetClientID() string

func GetEnvByChatspace

func GetEnvByChatspace(aSpace string) (string, bool)

func GetEnvByMessageId

func GetEnvByMessageId(messageId string) (string, error)

Utility function to extract environment of message

func GetTTBToken

func GetTTBToken() string

func InitNetwork

func InitNetwork(configContext *tccore.ConfigContext)

func IsKernelPluginMode

func IsKernelPluginMode() bool

func IsSpaceAuthorized

func IsSpaceAuthorized(aSpace string) (string, bool)

Return true if space is authorized

func RunDiagnostics

func RunDiagnostics(ctx context.Context, req *ttsdk.DiagnosticRequest) (*ttsdk.DiagnosticResponse, func(), error)

Types

type EchoBus

type EchoBus struct {
	Env          string
	ChatSpace    string
	RequestsChan chan *ttsdk.DiagnosticRequest
	ResponseChan chan *ttsdk.DiagnosticResponse
}

type EchoNetwork

type EchoNetwork map[string]*EchoBus

Buses will be indexed by environment

Jump to

Keyboard shortcuts

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