yr.Context

Contents

yr.Context#

class yr.Context(options: dict)[source]#

Bases: object

Context information provided by the openyuanrong runtime.

Methods

__init__

getAccessKey

Method getAccessKey, not exposed

getAlias

Method getAlias, not exposed

getAuthToken

Method getAuthToken, not exposed

getCPUNumber

Get the number of cpu distributed to the running function the cpu number scale by millicores, one cpu cores equals 1000 millicores.

getFunctionName

Get name of the function.

getLogger

Get the logger for user to log out in standard output, The Logger interface must be provided in SDK

getMemorySize

Get the memory size distributed the running function.

getPackage

Get function package.

getProjectID

Method getProjectID, not exposed

getRemainingTimeInMilliSeconds

Method getRemainingTimeInMilliSeconds, not exposed

getRequestID

Get request ID.

getRunningTimeInSeconds

Method getRunningTimeInSeconds, not exposed

getSecretKey

Method getSecretKey, not exposed

getSecurityAccessKey

Method getSecurityAccessKey, not exposed

getSecuritySecretKey

Method getSecuritySecretKey, not exposed

getSecurityToken

Method getSecurityToken, not exposed

getTenantID

Get tenant ID.

getUserData

Get the value passed in by the user through environment variables via the key.

getVersion

Get version of the function.

get_instance_id

Method get_instance_id, not exposed

get_invoke_id

Method get_invoke_id, not exposed

get_invoke_property

Method get_invoke_property, not exposed

get_session_id

get_session_service

get_state

Method get_state, not exposed

get_stream

Get SSE stream writer.

get_trace_id

Method get_trace_id, not exposed

setAccessKey

Method setAccessKey, not exposed

setAuthToken

Method setAuthToken, not exposed

setSecretKey

Method SetSecretKey, not exposed

setSecurityAccessKey

Method setAccessKey, not exposed

setSecuritySecretKey

Method SetSecretKey, not exposed

setSecurityToken

Method setSecurityToken, not exposed

set_instance_id

Method set_instance_id, not exposed

set_session_id

set_state

Method set_state, not exposed

set_trace_id

Method get_trace_id, not exposed