kernel

package
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package kernel defines the interface for go programs to interact with the @jsii/kernel node process. This module completely abstracts managament of the child process.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseClient

func CloseClient()

CloseClient finalizes the runtime process, signalling the end of the execution to the jsii kernel process, and waiting for graceful termination.

If a jsii client is used *after* CloseClient was called, a new jsii kernel process will be initialized, and CloseClient should be called again to correctly finalize that, too.

func GetClient

func GetClient() *client

GetClient returns a singleton client instance, initializing one the first time it is called.

Types

type BeginRequest

type BeginRequest struct {
	API       string        `json:"api"`
	Method    *string       `json:"method"`
	Arguments []interface{} `json:"args"`
	ObjRef    api.ObjectRef `json:"objref"`
	// contains filtered or unexported fields
}

type BeginResponse

type BeginResponse struct {
	PromiseID *string `json:"promise_id"`
	// contains filtered or unexported fields
}

type CallbacksResponse

type CallbacksResponse struct {
	Callbacks []api.Callback `json:"callbacks"`
	// contains filtered or unexported fields
}

type CompleteRequest

type CompleteRequest struct {
	API        string      `json:"api"`
	CallbackID *string     `json:"cbid"`
	Error      *string     `json:"err"`
	Result     interface{} `json:"result"`
	// contains filtered or unexported fields
}

type CompleteResponse

type CompleteResponse struct {
	CallbackID *string `json:"cbid"`
	// contains filtered or unexported fields
}

type CreateRequest

type CreateRequest struct {
	API        string         `json:"api"`
	FQN        api.FQN        `json:"fqn"`
	Interfaces []api.FQN      `json:"interfaces"`
	Arguments  []interface{}  `json:"args"`
	Overrides  []api.Override `json:"overrides"`
	// contains filtered or unexported fields
}

type CreateResponse

type CreateResponse struct {
	InstanceID string `json:"$jsii.byref"`
	// contains filtered or unexported fields
}

TODO extends AnnotatedObjRef?

func (*CreateResponse) UnmarshalJSON

func (r *CreateResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON provides custom unmarshalling implementation for response structs. Creating new types is required in order to avoid infinite recursion.

type DelRequest

type DelRequest struct {
	API    string        `json:"api"`
	ObjRef api.ObjectRef `json:"objref"`
	// contains filtered or unexported fields
}

type DelResponse

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

type EndRequest

type EndRequest struct {
	API       string  `json:"api"`
	PromiseID *string `json:"promise_id"`
	// contains filtered or unexported fields
}

type EndResponse

type EndResponse struct {
	Result interface{} `json:"result"`
	// contains filtered or unexported fields
}

type GetRequest

type GetRequest struct {
	API      string        `json:"api"`
	Property string        `json:"property"`
	ObjRef   api.ObjectRef `json:"objref"`
	// contains filtered or unexported fields
}

type GetResponse

type GetResponse struct {
	Value interface{} `json:"value"`
	// contains filtered or unexported fields
}

func (*GetResponse) UnmarshalJSON

func (r *GetResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON provides custom unmarshalling implementation for response structs. Creating new types is required in order to avoid infinite recursion.

type HelloMessage

type HelloMessage struct {
	Hello string `json:"hello"`
	// contains filtered or unexported fields
}

type InvokeRequest

type InvokeRequest struct {
	API       string        `json:"api"`
	Method    string        `json:"method"`
	Arguments []interface{} `json:"args"`
	ObjRef    api.ObjectRef `json:"objref"`
	// contains filtered or unexported fields
}

type InvokeResponse

type InvokeResponse struct {
	Result interface{} `json:"result"`
	// contains filtered or unexported fields
}

func (*InvokeResponse) UnmarshalJSON

func (r *InvokeResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON provides custom unmarshalling implementation for response structs. Creating new types is required in order to avoid infinite recursion.

type LoadRequest

type LoadRequest struct {
	API     string `json:"api"`
	Name    string `json:"name"`
	Version string `json:"version"`
	Tarball string `json:"tarball"`
	// contains filtered or unexported fields
}

LoadRequest holds the necessary information to load a library into the @jsii/kernel process through the Load method.

type LoadResponse

type LoadResponse struct {
	Assembly string  `json:"assembly"`
	Types    float64 `json:"types"`
	// contains filtered or unexported fields
}

LoadResponse contains the data returned by the @jsii/kernel process in response to a load request.

func (*LoadResponse) UnmarshalJSON

func (r *LoadResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON provides custom unmarshalling implementation for response structs. Creating new types is required in order to avoid infinite recursion.

type NamingRequest

type NamingRequest struct {
	API      string `json:"api"`
	Assembly string `json:"assembly"`
	// contains filtered or unexported fields
}

type NamingResponse

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

type SetRequest

type SetRequest struct {
	API      string        `json:"api"`
	Property string        `json:"property"`
	Value    interface{}   `json:"value"`
	ObjRef   api.ObjectRef `json:"objref"`
	// contains filtered or unexported fields
}

type SetResponse

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

func (*SetResponse) UnmarshalJSON

func (r *SetResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON provides custom unmarshalling implementation for response structs. Creating new types is required in order to avoid infinite recursion.

type StaticGetRequest

type StaticGetRequest struct {
	API      string  `json:"api"`
	FQN      api.FQN `json:"fqn"`
	Property string  `json:"property"`
	// contains filtered or unexported fields
}

type StaticInvokeRequest

type StaticInvokeRequest struct {
	API       string        `json:"api"`
	FQN       api.FQN       `json:"fqn"`
	Method    string        `json:"method"`
	Arguments []interface{} `json:"args"`
	// contains filtered or unexported fields
}

type StaticSetRequest

type StaticSetRequest struct {
	API      string      `json:"api"`
	FQN      api.FQN     `json:"fqn"`
	Property string      `json:"property"`
	Value    interface{} `json:"value"`
	// contains filtered or unexported fields
}

type StatsResponse

type StatsResponse struct {
	ObjectCount float64 `json:"object_count"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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