Documentation
¶
Overview ¶
Package serverless provides the server serverless function context.
Index ¶
- type Context
- func (c *Context) Data() []byte
- func (c *Context) HTTP() serverless.HTTP
- func (c *Context) LLMFunctionCall() (*ai.FunctionCall, error)
- func (c *Context) Metadata(key string) (string, bool)
- func (c *Context) ReadLLMArguments(args any) error
- func (c *Context) Tag() uint32
- func (c *Context) Write(tag uint32, data []byte) error
- func (c *Context) WriteLLMResult(result string) error
- func (c *Context) WriteWithTarget(tag uint32, data []byte, target string) error
- type CronContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context sfn handler context
func NewContext ¶
NewContext creates a new serverless Context
func (*Context) HTTP ¶ added in v1.13.1
func (c *Context) HTTP() serverless.HTTP
HTTP is the interface of Context for HTTP request, but it is not implemented in the server side
func (*Context) LLMFunctionCall ¶ added in v1.18.10
func (c *Context) LLMFunctionCall() (*ai.FunctionCall, error)
LLMFunctionCall reads LLM function call
func (*Context) ReadLLMArguments ¶ added in v1.18.9
ReadLLMArguments reads LLM function arguments
func (*Context) WriteLLMResult ¶ added in v1.18.9
WriteLLMResult writes LLM function result
type CronContext ¶ added in v1.17.5
type CronContext struct {
// contains filtered or unexported fields
}
CronContext sfn cron handler context
func NewCronContext ¶ added in v1.17.5
func NewCronContext(writer frame.Writer, md metadata.M) *CronContext
NewCronContext creates a new serverless CronContext
func (*CronContext) HTTP ¶ added in v1.17.5
func (c *CronContext) HTTP() serverless.HTTP
HTTP is the interface of CronContext for HTTP request, but it is not implemented in the server side
func (*CronContext) Write ¶ added in v1.17.5
func (c *CronContext) Write(tag uint32, data []byte) error
Write writes the data to next sfn instance.
func (*CronContext) WriteWithTarget ¶ added in v1.17.5
func (c *CronContext) WriteWithTarget(tag uint32, data []byte, target string) error
WriteWithTarget writes the data to next sfn instance with specified target.