Documentation
¶
Overview ¶
Package cfc
Index ¶
- Constants
- func Main() error
- func RegisterNamedHandler(name string, h InvokeHandler)
- type CfcClient
- type Credential
- type InvokeContext
- type InvokeError
- type InvokeHandler
- type InvokeRequest
- type InvokeResponse
- type MissingHandlerError
- type RuntimeConfig
- func (c *RuntimeConfig) FunctionBrn() string
- func (c *RuntimeConfig) FunctionName() string
- func (c *RuntimeConfig) FunctionVersion() string
- func (c *RuntimeConfig) Handler() string
- func (c *RuntimeConfig) InvokePipe() int
- func (c *RuntimeConfig) MemorySize() int
- func (c *RuntimeConfig) ResponsePipe() int
- func (c *RuntimeConfig) StartTime() time.Time
- func (c *RuntimeConfig) UserCodeRoot() string
Constants ¶
View Source
const ( BCE_USER_CODE_ROOT = "BCE_USER_CODE_ROOT" BCE_CFC_INVOKE_PIPE = "BCE_CFC_INVOKE_PIPE" BCE_CFC_RESPONSE_PIPE = "BCE_CFC_RESPONSE_PIPE" BCE_USER_FUNCTION_BRN = "BCE_USER_FUNCTION_BRN" BCE_USER_FUNCTION_NAME = "BCE_USER_FUNCTION_NAME" BCE_USER_FUNCTION_MEMSIZE = "BCE_USER_FUNCTION_MEMSIZE" BCE_USER_FUNCTION_VERSION = "BCE_USER_FUNCTION_VERSION" BCE_USER_FUNCTION_HANDLER = "BCE_USER_FUNCTION_HANDLER" )
View Source
const (
MAX_INVOKE_EVENT_LENGTH = 6 * 1024 * 1024
)
Variables ¶
This section is empty.
Functions ¶
func RegisterNamedHandler ¶
func RegisterNamedHandler(name string, h InvokeHandler)
Types ¶
type CfcClient ¶
type CfcClient struct {
// contains filtered or unexported fields
}
func NewCfcClient ¶
func NewCfcClient(c *RuntimeConfig, maxEventSize int) *CfcClient
func (*CfcClient) WaitInvoke ¶
type Credential ¶
type InvokeContext ¶
type InvokeContext interface { GetRequestID() string GetFunctionBrn() string GetFunctionName() string GetFunctionVersion() string GetMemoryLimitMB() int GetCredential() *Credential GetClientContext() []byte }
func NewInvokeContext ¶
func NewInvokeContext(reqId string, config *RuntimeConfig, credential *Credential, clientCtx []byte) InvokeContext
type InvokeError ¶ added in v1.1.0
type InvokeHandler ¶
type InvokeRequest ¶
type InvokeResponse ¶
type MissingHandlerError ¶ added in v1.1.0
type MissingHandlerError struct {
// contains filtered or unexported fields
}
func (MissingHandlerError) Error ¶ added in v1.1.0
func (e MissingHandlerError) Error() string
type RuntimeConfig ¶
type RuntimeConfig struct {
// contains filtered or unexported fields
}
func NewRuntimeConfig ¶
func NewRuntimeConfig() (*RuntimeConfig, error)
func (*RuntimeConfig) FunctionBrn ¶
func (c *RuntimeConfig) FunctionBrn() string
func (*RuntimeConfig) FunctionName ¶
func (c *RuntimeConfig) FunctionName() string
func (*RuntimeConfig) FunctionVersion ¶
func (c *RuntimeConfig) FunctionVersion() string
func (*RuntimeConfig) Handler ¶
func (c *RuntimeConfig) Handler() string
func (*RuntimeConfig) InvokePipe ¶
func (c *RuntimeConfig) InvokePipe() int
func (*RuntimeConfig) MemorySize ¶
func (c *RuntimeConfig) MemorySize() int
func (*RuntimeConfig) ResponsePipe ¶
func (c *RuntimeConfig) ResponsePipe() int
func (*RuntimeConfig) StartTime ¶
func (c *RuntimeConfig) StartTime() time.Time
func (*RuntimeConfig) UserCodeRoot ¶
func (c *RuntimeConfig) UserCodeRoot() string
Click to show internal directories.
Click to hide internal directories.