Documentation
¶
Index ¶
- Variables
- func NewFunctionEndpoints() []*api.Endpoint
- func RegisterFunctionHandler(s server.Server, hdlr FunctionHandler, opts ...server.HandlerOption) error
- type CallRequest
- func (*CallRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CallRequest) GetName() string
- func (x *CallRequest) GetRequest() *structpb.Struct
- func (*CallRequest) ProtoMessage()
- func (x *CallRequest) ProtoReflect() protoreflect.Message
- func (x *CallRequest) Reset()
- func (x *CallRequest) String() string
- type CallResponse
- type DeleteRequest
- func (*DeleteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteRequest) GetName() string
- func (x *DeleteRequest) GetProject() string
- func (*DeleteRequest) ProtoMessage()
- func (x *DeleteRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteRequest) Reset()
- func (x *DeleteRequest) String() string
- type DeleteResponse
- type DeployRequest
- func (*DeployRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeployRequest) GetEntrypoint() string
- func (x *DeployRequest) GetEnvVars() map[string]string
- func (x *DeployRequest) GetName() string
- func (x *DeployRequest) GetProject() string
- func (x *DeployRequest) GetRepo() string
- func (x *DeployRequest) GetRuntime() string
- func (x *DeployRequest) GetSubfolder() string
- func (*DeployRequest) ProtoMessage()
- func (x *DeployRequest) ProtoReflect() protoreflect.Message
- func (x *DeployRequest) Reset()
- func (x *DeployRequest) String() string
- type DeployResponse
- type DescribeRequest
- func (*DescribeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DescribeRequest) GetName() string
- func (x *DescribeRequest) GetProject() string
- func (*DescribeRequest) ProtoMessage()
- func (x *DescribeRequest) ProtoReflect() protoreflect.Message
- func (x *DescribeRequest) Reset()
- func (x *DescribeRequest) String() string
- type DescribeResponse
- func (*DescribeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DescribeResponse) GetFunction() *Func
- func (x *DescribeResponse) GetTimeout() string
- func (x *DescribeResponse) GetUpdatedAt() string
- func (*DescribeResponse) ProtoMessage()
- func (x *DescribeResponse) ProtoReflect() protoreflect.Message
- func (x *DescribeResponse) Reset()
- func (x *DescribeResponse) String() string
- type Func
- func (*Func) Descriptor() ([]byte, []int)deprecated
- func (x *Func) GetEntrypoint() string
- func (x *Func) GetName() string
- func (x *Func) GetProject() string
- func (x *Func) GetRepo() string
- func (x *Func) GetRuntime() string
- func (x *Func) GetStatus() string
- func (x *Func) GetSubfolder() string
- func (*Func) ProtoMessage()
- func (x *Func) ProtoReflect() protoreflect.Message
- func (x *Func) Reset()
- func (x *Func) String() string
- type FunctionHandler
- type FunctionService
- type ListRequest
- type ListResponse
Constants ¶
This section is empty.
Variables ¶
var File_proto_function_proto protoreflect.FileDescriptor
Functions ¶
func NewFunctionEndpoints ¶
func RegisterFunctionHandler ¶
func RegisterFunctionHandler(s server.Server, hdlr FunctionHandler, opts ...server.HandlerOption) error
Types ¶
type CallRequest ¶
type CallRequest struct {
// Name of the function
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Request body that will be passed to the function
Request *structpb.Struct `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
// contains filtered or unexported fields
}
Call a function by name
func (*CallRequest) Descriptor
deprecated
func (*CallRequest) Descriptor() ([]byte, []int)
Deprecated: Use CallRequest.ProtoReflect.Descriptor instead.
func (*CallRequest) GetName ¶
func (x *CallRequest) GetName() string
func (*CallRequest) GetRequest ¶
func (x *CallRequest) GetRequest() *structpb.Struct
func (*CallRequest) ProtoMessage ¶
func (*CallRequest) ProtoMessage()
func (*CallRequest) ProtoReflect ¶
func (x *CallRequest) ProtoReflect() protoreflect.Message
func (*CallRequest) Reset ¶
func (x *CallRequest) Reset()
func (*CallRequest) String ¶
func (x *CallRequest) String() string
type CallResponse ¶
type CallResponse struct {
// Response body that the function returned
Response *structpb.Struct `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
// contains filtered or unexported fields
}
func (*CallResponse) Descriptor
deprecated
func (*CallResponse) Descriptor() ([]byte, []int)
Deprecated: Use CallResponse.ProtoReflect.Descriptor instead.
func (*CallResponse) GetResponse ¶
func (x *CallResponse) GetResponse() *structpb.Struct
func (*CallResponse) ProtoMessage ¶
func (*CallResponse) ProtoMessage()
func (*CallResponse) ProtoReflect ¶
func (x *CallResponse) ProtoReflect() protoreflect.Message
func (*CallResponse) Reset ¶
func (x *CallResponse) Reset()
func (*CallResponse) String ¶
func (x *CallResponse) String() string
type DeleteRequest ¶
type DeleteRequest struct {
// The name of the function
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Optional project name
Project string `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"`
// contains filtered or unexported fields
}
Delete a function by name
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetName ¶
func (x *DeleteRequest) GetName() string
func (*DeleteRequest) GetProject ¶
func (x *DeleteRequest) GetProject() string
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
type DeleteResponse ¶
type DeleteResponse struct {
// contains filtered or unexported fields
}
func (*DeleteResponse) Descriptor
deprecated
func (*DeleteResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.
func (*DeleteResponse) ProtoMessage ¶
func (*DeleteResponse) ProtoMessage()
func (*DeleteResponse) ProtoReflect ¶
func (x *DeleteResponse) ProtoReflect() protoreflect.Message
func (*DeleteResponse) Reset ¶
func (x *DeleteResponse) Reset()
func (*DeleteResponse) String ¶
func (x *DeleteResponse) String() string
type DeployRequest ¶
type DeployRequest struct {
// github url to repo
Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
// optional subfolder path
Subfolder string `protobuf:"bytes,2,opt,name=subfolder,proto3" json:"subfolder,omitempty"`
// function name
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
// entry point, ie. handler name in the source code
// if not provided, defaults to the name parameter
Entrypoint string `protobuf:"bytes,4,opt,name=entrypoint,proto3" json:"entrypoint,omitempty"`
// project is used for namespacing your functions
// optional. defaults to "default".
Project string `protobuf:"bytes,5,opt,name=project,proto3" json:"project,omitempty"`
// runtime/language of the function
// eg: php74,
// nodejs6, nodejs8, nodejs10, nodejs12, nodejs14, nodejs16
// dotnet3
// java11
// ruby26, ruby27
// go111, go113, go116
// python37, python38, python39
Runtime string `protobuf:"bytes,6,opt,name=runtime,proto3" json:"runtime,omitempty"`
// environment variables to pass in at runtime
EnvVars map[string]string `` /* 170-byte string literal not displayed */
// contains filtered or unexported fields
}
Deploy a group of functions
func (*DeployRequest) Descriptor
deprecated
func (*DeployRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeployRequest.ProtoReflect.Descriptor instead.
func (*DeployRequest) GetEntrypoint ¶
func (x *DeployRequest) GetEntrypoint() string
func (*DeployRequest) GetEnvVars ¶
func (x *DeployRequest) GetEnvVars() map[string]string
func (*DeployRequest) GetName ¶
func (x *DeployRequest) GetName() string
func (*DeployRequest) GetProject ¶
func (x *DeployRequest) GetProject() string
func (*DeployRequest) GetRepo ¶
func (x *DeployRequest) GetRepo() string
func (*DeployRequest) GetRuntime ¶
func (x *DeployRequest) GetRuntime() string
func (*DeployRequest) GetSubfolder ¶
func (x *DeployRequest) GetSubfolder() string
func (*DeployRequest) ProtoMessage ¶
func (*DeployRequest) ProtoMessage()
func (*DeployRequest) ProtoReflect ¶
func (x *DeployRequest) ProtoReflect() protoreflect.Message
func (*DeployRequest) Reset ¶
func (x *DeployRequest) Reset()
func (*DeployRequest) String ¶
func (x *DeployRequest) String() string
type DeployResponse ¶
type DeployResponse struct {
// contains filtered or unexported fields
}
func (*DeployResponse) Descriptor
deprecated
func (*DeployResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeployResponse.ProtoReflect.Descriptor instead.
func (*DeployResponse) ProtoMessage ¶
func (*DeployResponse) ProtoMessage()
func (*DeployResponse) ProtoReflect ¶
func (x *DeployResponse) ProtoReflect() protoreflect.Message
func (*DeployResponse) Reset ¶
func (x *DeployResponse) Reset()
func (*DeployResponse) String ¶
func (x *DeployResponse) String() string
type DescribeRequest ¶
type DescribeRequest struct {
// The name of the function
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Optional project name
Project string `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"`
// contains filtered or unexported fields
}
Get the info for a deployed function
func (*DescribeRequest) Descriptor
deprecated
func (*DescribeRequest) Descriptor() ([]byte, []int)
Deprecated: Use DescribeRequest.ProtoReflect.Descriptor instead.
func (*DescribeRequest) GetName ¶
func (x *DescribeRequest) GetName() string
func (*DescribeRequest) GetProject ¶
func (x *DescribeRequest) GetProject() string
func (*DescribeRequest) ProtoMessage ¶
func (*DescribeRequest) ProtoMessage()
func (*DescribeRequest) ProtoReflect ¶
func (x *DescribeRequest) ProtoReflect() protoreflect.Message
func (*DescribeRequest) Reset ¶
func (x *DescribeRequest) Reset()
func (*DescribeRequest) String ¶
func (x *DescribeRequest) String() string
type DescribeResponse ¶
type DescribeResponse struct {
// The function requested
Function *Func `protobuf:"bytes,1,opt,name=function,proto3" json:"function,omitempty"`
// The time at which the function was updated
UpdatedAt string `protobuf:"bytes,2,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
// The timeout for requests to the function
Timeout string `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
// contains filtered or unexported fields
}
func (*DescribeResponse) Descriptor
deprecated
func (*DescribeResponse) Descriptor() ([]byte, []int)
Deprecated: Use DescribeResponse.ProtoReflect.Descriptor instead.
func (*DescribeResponse) GetFunction ¶
func (x *DescribeResponse) GetFunction() *Func
func (*DescribeResponse) GetTimeout ¶
func (x *DescribeResponse) GetTimeout() string
func (*DescribeResponse) GetUpdatedAt ¶
func (x *DescribeResponse) GetUpdatedAt() string
func (*DescribeResponse) ProtoMessage ¶
func (*DescribeResponse) ProtoMessage()
func (*DescribeResponse) ProtoReflect ¶
func (x *DescribeResponse) ProtoReflect() protoreflect.Message
func (*DescribeResponse) Reset ¶
func (x *DescribeResponse) Reset()
func (*DescribeResponse) String ¶
func (x *DescribeResponse) String() string
type Func ¶
type Func struct {
// project of function, optional
// defaults to literal "default"
// used to namespace functions
Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
// function name
// limitation: must be unique across projects
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// name of handler in source code
Entrypoint string `protobuf:"bytes,3,opt,name=entrypoint,proto3" json:"entrypoint,omitempty"`
// git repo address
Repo string `protobuf:"bytes,4,opt,name=repo,proto3" json:"repo,omitempty"`
// subfolder path to entrypoint
Subfolder string `protobuf:"bytes,5,opt,name=subfolder,proto3" json:"subfolder,omitempty"`
// runtime/language of the function
// eg: php74,
// nodejs6, nodejs8, nodejs10, nodejs12, nodejs14, nodejs16
// dotnet3
// java11
// ruby26, ruby27
// go111, go113, go116
// python37, python38, python39
Runtime string `protobuf:"bytes,6,opt,name=runtime,proto3" json:"runtime,omitempty"`
// eg. ACTIVE, DEPLOY_IN_PROGRESS, OFFLINE etc
Status string `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty"`
// contains filtered or unexported fields
}
func (*Func) Descriptor
deprecated
func (*Func) GetEntrypoint ¶
func (*Func) GetProject ¶
func (*Func) GetRuntime ¶
func (*Func) GetSubfolder ¶
func (*Func) ProtoMessage ¶
func (*Func) ProtoMessage()
func (*Func) ProtoReflect ¶
func (x *Func) ProtoReflect() protoreflect.Message
type FunctionHandler ¶
type FunctionHandler interface {
Call(context.Context, *CallRequest, *CallResponse) error
Deploy(context.Context, *DeployRequest, *DeployResponse) error
List(context.Context, *ListRequest, *ListResponse) error
Delete(context.Context, *DeleteRequest, *DeleteResponse) error
Describe(context.Context, *DescribeRequest, *DescribeResponse) error
}
type FunctionService ¶
type FunctionService interface {
Call(ctx context.Context, in *CallRequest, opts ...client.CallOption) (*CallResponse, error)
Deploy(ctx context.Context, in *DeployRequest, opts ...client.CallOption) (*DeployResponse, error)
List(ctx context.Context, in *ListRequest, opts ...client.CallOption) (*ListResponse, error)
Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error)
Describe(ctx context.Context, in *DescribeRequest, opts ...client.CallOption) (*DescribeResponse, error)
}
func NewFunctionService ¶
func NewFunctionService(name string, c client.Client) FunctionService
type ListRequest ¶
type ListRequest struct {
// optional project name
Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
// contains filtered or unexported fields
}
List all the deployed functions
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetProject ¶
func (x *ListRequest) GetProject() string
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
type ListResponse ¶
type ListResponse struct {
// List of functions deployed
Functions []*Func `protobuf:"bytes,1,rep,name=functions,proto3" json:"functions,omitempty"`
// contains filtered or unexported fields
}
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetFunctions ¶
func (x *ListResponse) GetFunctions() []*Func
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoReflect ¶
func (x *ListResponse) ProtoReflect() protoreflect.Message
func (*ListResponse) Reset ¶
func (x *ListResponse) Reset()
func (*ListResponse) String ¶
func (x *ListResponse) String() string