Runtime bindings

Technical reference of Bindings del runtime.


Symbols

SymbolClassDescription
ResetRuntimeContextfuncReboot ResetRuntimeContext.
SetRuntimeContextStatefuncSets SetRuntimeContextState.
RuntimeContextStatefuncIt gets the private state of Context.
ResetRuntimeBodyfuncReboot ResetRuntimeBody.
SetRuntimeRequestIPfuncSets SetRuntimeRequestIP.
SetRuntimeRequestRoutefuncSets SetRuntimeRequestRoute.
ServerInfoBindingstypeServerInfoBindings defines a public type of API.
BindServerInfofuncInstall BindServerInfo.
ClusterInfoBindingstypeClusterInfoBindings defines a public type of API.
BindClusterInfofuncInstall BindClusterInfo.
SessionRegistryBindingstypeSessionRegistryBindings defines a public type of API.
BindSessionRegistryfuncInstall BindSessionRegistry.

ResetRuntimeContext

Declaration:

gox
func ResetRuntimeContext(ctx *Context)

Reboot ResetRuntimeContext.

Parameters

ParameterTypeDescription
ctx*ContextContext of execution.

SetRuntimeContextState

Declaration:

gox
func SetRuntimeContextState(ctx *Context, state any)

Sets SetRuntimeContextState.

Parameters

ParameterTypeDescription
ctx*ContextContext of execution.
stateanyType value any required by the operation.

RuntimeContextState

Declaration:

gox
func RuntimeContextState(ctx *Context) any

It gets the private state of Context.

Parameters

ParameterTypeDescription
ctx*ContextContext of execution.

Returns

ReturnTypeDescription
valueanyType value any produced by the operation.

ResetRuntimeBody

Declaration:

gox
func ResetRuntimeBody(value Body, reader io.ReadCloser, contentType string) bool

Reboot ResetRuntimeBody.

Parameters

ParameterTypeDescription
valueBodyValue to be stored or issued.
readerio.ReadCloserReading source.
contentTypestringMIME type of content.

Returns

ReturnTypeDescription
valueboolIt indicates the result of the check.

SetRuntimeRequestIP

Declaration:

gox
func SetRuntimeRequestIP(request *Request, ip string)

Sets SetRuntimeRequestIP.

Parameters

ParameterTypeDescription
request*RequestType value *Request required by the operation.
ipstringType value string required by the operation.

SetRuntimeRequestRoute

Declaration:

gox
func SetRuntimeRequestRoute(request *Request, route Route)

Sets SetRuntimeRequestRoute.

Parameters

ParameterTypeDescription
request*RequestType value *Request required by the operation.
routeRouteType value Route required by the operation.

ServerInfoBindings

Declaration:

gox
type ServerInfoBindings struct {
	ProjectName   func() string
	InstanceID    func() string
	StartedAt     func() time.Time
	Host          func() string
	Port          func() int
	IsDevelopment func() bool
	IsClustered   func() bool
}

ServerInfoBindings defines a public type of API.

Fields

FieldTypeDescription
ProjectNamefunc() stringName of the element.
InstanceIDfunc() stringAssociated identifier.
StartedAtfunc() time.TimeTime mark.
Hostfunc() stringHost, including the port when it exists.
Portfunc() intExplicit URL port.
IsDevelopmentfunc() boolPublic data associated with IsDevelopment.
IsClusteredfunc() boolPublic data associated with IsClustered.

BindServerInfo

Declaration:

gox
func BindServerInfo(bindings ServerInfoBindings) func()

Install BindServerInfo.

Parameters

ParameterTypeDescription
bindingsServerInfoBindingsType value ServerInfoBindings required by the operation.

Returns

ReturnTypeDescription
valuefunc()Type value func() produced by the operation.

ClusterInfoBindings

Declaration:

gox
type ClusterInfoBindings struct {
	Enabled func() bool
	Adapter func() string
}

ClusterInfoBindings defines a public type of API.

Fields

FieldTypeDescription
Enabledfunc() boolActivate or disable the function.
Adapterfunc() stringName of the adapter.

BindClusterInfo

Declaration:

gox
func BindClusterInfo(bindings ClusterInfoBindings) func()

Install BindClusterInfo.

Parameters

ParameterTypeDescription
bindingsClusterInfoBindingsType value ClusterInfoBindings required by the operation.

Returns

ReturnTypeDescription
valuefunc()Type value func() produced by the operation.

SessionRegistryBindings

Declaration:

gox
type SessionRegistryBindings struct {
	Get func(sessionID string) (*Session, error)
}

SessionRegistryBindings defines a public type of API.

Fields

FieldTypeDescription
Getfunc(sessionID string) (*Session, error)Query callback.

BindSessionRegistry

Declaration:

gox
func BindSessionRegistry(bindings SessionRegistryBindings) func()

Install BindSessionRegistry.

Parameters

ParameterTypeDescription
bindingsSessionRegistryBindingsType value SessionRegistryBindings required by the operation.

Returns

ReturnTypeDescription
valuefunc()Type value func() produced by the operation.

Next step

Continue with issue of Client islands.

Client islands runtime