internal

package
v0.0.0-...-cd6ae7c Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2024 License: CC0-1.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SDKSemverVersion = "v0.0.1"
	SDKLanguage      = "Go"
)

Variables

This section is empty.

Functions

func ReleaseCore

func ReleaseCore()

Types

type Core

type Core interface {
	Init(ctx context.Context) error
	Invoke(ctx context.Context, invocation Invocation) ([]byte, error)
}

type InnerSDK

type InnerSDK struct {
	Core Core
}

InnerSDK represents the sdk-core client on which calls will be made.

func (InnerSDK) Invoke

func (sdk InnerSDK) Invoke(ctx context.Context, method string, args []any, returnValue any) error

type Invocation

type Invocation struct {
	Method string `json:"method"`
	Args   []any  `json:"args,omitempty"`
}

Invocation holds the information required for invoking SDK functionality.

type SDKRuntimeInfo

type SDKRuntimeInfo struct {
	SDKVersion         string `json:"sdkVersion"`
	SDKLanguage        string `json:"sdkLanguage"`
	SDKLanguageVersion string `json:"sdkLanguageVersion"`
	SystemOS           string `json:"os"`
	SystemOSVersion    string `json:"osVersion"`
	SystemArch         string `json:"architecture"`
}

SDKRuntimeInfo contains information required for sdk runtime

func NewDefaultSDKRuntimeInfo

func NewDefaultSDKRuntimeInfo() SDKRuntimeInfo

type SharedCore

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

SharedCore implements Core in such a way that all created client instances share the same core resources.

func GetSharedCore

func GetSharedCore() *SharedCore

GetSharedCore initializes the shared core once and returns the already existing one on subsequent calls.

func (*SharedCore) Init

func (c *SharedCore) Init(ctx context.Context) error

func (*SharedCore) Invoke

func (c *SharedCore) Invoke(ctx context.Context, invocation Invocation) ([]byte, error)

Invoke calls specified logic from core

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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