glob

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package glob provide a global Sym pool for use dynamic

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrAlreadyExists occurs when register an already registered global Dynamic
	ErrAlreadyExists = errors.New("already registered into global")
	// ErrNotExists occurs when unregister a not registered global Dynamic
	ErrNotExists = errors.New("not registered into global")
)

Functions

func CloseGlobalDynamics

func CloseGlobalDynamics() error

CloseGlobalDynamics close all global dynamics and reload runtime symbols. this should only use when all Dynamics are free!

func GlobalDynamics

func GlobalDynamics() (v map[string]dynamic.Dynamic)

GlobalDynamics returns a copy map of global shared dynamics. should not modify any data. the result is map[FilePath|ModuleName] Dynamic

func GlobalSymbols

func GlobalSymbols() (v map[string]uintptr)

GlobalSymbols returns a copy of global symbols

func NewSymbols

func NewSymbols() dynamic.Symbols

NewSymbols clone of global symbols

func RegisterGlobalDynamic

func RegisterGlobalDynamic(name string, d dynamic.Dynamic) error

RegisterGlobalDynamic register an user Dynamic into global dependencies. name must be unique

func UnregisterGlobalDynamic

func UnregisterGlobalDynamic(name string) error

UnregisterGlobalDynamic unregister an user Dynamic by register name from global dependencies.

func UseGlobalExecute

func UseGlobalExecute(p string) error

UseGlobalExecute register symbols form a go executable, those symbols can't be linked, this function should only be use for testing dependencies.

func UseGlobalLinker

func UseGlobalLinker(file string) (err error)

UseGlobalLinker load a serialized linker and register to global dependencies.

func UseGlobalObject

func UseGlobalObject(file string, pkg string) (err error)

UseGlobalObject load a relocatable object file and register to global dependencies.

func UseGlobalSo

func UseGlobalSo(p string) error

UseGlobalSo register symbols form a golang dynamic library (.so)

func UseGlobalTypes

func UseGlobalTypes(p ...any)

UseGlobalTypes register types as global dependencies.

Types

This section is empty.

Jump to

Keyboard shortcuts

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