Documentation
¶
Overview ¶
Package jsii provides the APIs used by code generated by the jsii-pacmak tool to interact with the @jsii/kernel process. It is not intended for users to directly interact with, and doing so could result in incorrect behavior.
Index ¶
- func Close()
- func Create(fqn FQN, args []interface{}, interfaces []FQN, overrides []Override, ...)
- func Get(obj interface{}, property string, ret interface{})
- func InitJsiiProxy(ptr interface{})
- func Invoke(obj interface{}, method string, args []interface{}, hasReturn bool, ...)
- func Load(name string, version string, tarball []byte)
- func RegisterClass(fqn FQN, class reflect.Type, maker func() interface{})
- func RegisterEnum(fqn FQN, enum reflect.Type, members map[string]interface{})
- func RegisterInterface(fqn FQN, iface reflect.Type, maker func() interface{})
- func RegisterStruct(fqn FQN, strct reflect.Type)
- func Set(obj interface{}, property string, value interface{})
- func StaticGet(fqn FQN, property string, ret interface{})
- func StaticInvoke(fqn FQN, method string, args []interface{}, hasReturn bool, ret interface{})
- func StaticSet(fqn FQN, property string, value interface{})
- type FQN
- type MethodOverride
- type Override
- type PropertyOverride
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Close ¶
func Close()
Close finalizes the runtime process, signalling the end of the execution to the jsii kernel process, and waiting for graceful termination. The best practice is to defer call thins at the beginning of the "main" function.
If a jsii client is used *after* Close was called, a new jsii kernel process will be initialized, and Close should be called again to correctly finalize that, too. This behavior is intended for use in unit/integration tests.
func Create ¶
Create will construct a new JSII object within the kernel runtime. This is called by jsii object constructors.
func Get ¶
func Get(obj interface{}, property string, ret interface{})
Get reads a property value on a given jsii class instance. The response should be decoded into the expected type of the property being read.
func InitJsiiProxy ¶ added in v1.23.0
func InitJsiiProxy(ptr interface{})
InitJsiiProxy initializes a jsii proxy instance at the provided pointer. Panics if the pointer cannot be initialized to a proxy instance (i.e: the element of it is not a registered jsii interface or class type).
func Invoke ¶
Invoke will call a method on a jsii class instance. The response should be decoded into the expected return type for the method being called.
func RegisterClass ¶ added in v1.22.0
RegisterClass associates a class fully qualified name to the specified class interface, and proxy struct. Panics if class is not an go interface, proxy is not a go struct, or if the provided fqn was already used to register a different type.
func RegisterEnum ¶ added in v1.22.0
RegisterEnum associates an enum's fully qualified name to the specified enum type, and members. Panics if enum is not a reflect.String type, any value in the provided members map is of a type ofther than enum, or if the provided fqn was already used to register a different type.
func RegisterInterface ¶ added in v1.22.0
RegisterInterface associates an interface's fully qualified name to the specified interface type, and proxy maker function. Panics if iface is not an interface, or if the provided fqn was already used to register a different type.
func RegisterStruct ¶ added in v1.22.0
RegisterStruct associates a struct's fully qualified name to the specified struct type. Panics if strct is not a struct, or if the provided fqn was already used to register a different type.
func Set ¶
func Set(obj interface{}, property string, value interface{})
Set writes a property on a given jsii class instance. The value should match the type of the property being written, or the jsii kernel will crash.
func StaticGet ¶
StaticGet reads a static property value on a given jsii class. The response should be decoded into the expected type of the property being read.
func StaticInvoke ¶ added in v1.22.0
StaticInvoke will call a static method on a given jsii class. The response should be decoded into the expected return type for the method being called.
Types ¶
type MethodOverride ¶
type MethodOverride api.MethodOverride
type PropertyOverride ¶
type PropertyOverride api.PropertyOverride
Directories
¶
| Path | Synopsis |
|---|---|
|
Package api contains shared type definisions used by several modules part of the jsii runtime for go.
|
Package api contains shared type definisions used by several modules part of the jsii runtime for go. |
|
Package kernel defines the interface for go programs to interact with the @jsii/kernel node process.
|
Package kernel defines the interface for go programs to interact with the @jsii/kernel node process. |
|
Package typeregistry offers features useful to manage the registration and operation of types in the context of the jsii runtime.
|
Package typeregistry offers features useful to manage the registration and operation of types in the context of the jsii runtime. |
