Documentation
¶
Index ¶
- Constants
- Variables
- type ContainerFunctionService
- func (fs *ContainerFunctionService) FunctionGetArgs(ctx context.Context, in *pb.FunctionGetArgsRequest) (*pb.FunctionGetArgsResponse, error)
- func (fs *ContainerFunctionService) FunctionInvoke(in *pb.FunctionInvokeRequest, stream pb.FunctionService_FunctionInvokeServer) error
- func (fs *ContainerFunctionService) FunctionMonitor(req *pb.FunctionMonitorRequest, ...) error
- func (fs *ContainerFunctionService) FunctionSchedule(ctx context.Context, req *pb.FunctionScheduleRequest) (*pb.FunctionScheduleResponse, error)
- func (fs *ContainerFunctionService) FunctionSetResult(ctx context.Context, in *pb.FunctionSetResultRequest) (*pb.FunctionSetResultResponse, error)
- type FunctionService
- type FunctionServiceOpts
- type FunctionTask
- func (t *FunctionTask) Cancel(ctx context.Context, reason types.TaskCancellationReason) error
- func (t *FunctionTask) Execute(ctx context.Context, options ...interface{}) error
- func (t *FunctionTask) HeartBeat(ctx context.Context) (bool, error)
- func (t *FunctionTask) Message() *types.TaskMessage
- func (t *FunctionTask) Metadata() types.TaskMetadata
- func (t *FunctionTask) Retry(ctx context.Context) error
Constants ¶
View Source
const (
DefaultFunctionTaskTTL uint32 = 3600 * 12 // 12 hours
)
Variables ¶
View Source
var Keys = &keys{}
Functions ¶
This section is empty.
Types ¶
type ContainerFunctionService ¶
type ContainerFunctionService struct {
pb.UnimplementedFunctionServiceServer
// contains filtered or unexported fields
}
func (*ContainerFunctionService) FunctionGetArgs ¶
func (fs *ContainerFunctionService) FunctionGetArgs(ctx context.Context, in *pb.FunctionGetArgsRequest) (*pb.FunctionGetArgsResponse, error)
func (*ContainerFunctionService) FunctionInvoke ¶
func (fs *ContainerFunctionService) FunctionInvoke(in *pb.FunctionInvokeRequest, stream pb.FunctionService_FunctionInvokeServer) error
func (*ContainerFunctionService) FunctionMonitor ¶
func (fs *ContainerFunctionService) FunctionMonitor(req *pb.FunctionMonitorRequest, stream pb.FunctionService_FunctionMonitorServer) error
func (*ContainerFunctionService) FunctionSchedule ¶
func (fs *ContainerFunctionService) FunctionSchedule(ctx context.Context, req *pb.FunctionScheduleRequest) (*pb.FunctionScheduleResponse, error)
func (*ContainerFunctionService) FunctionSetResult ¶
func (fs *ContainerFunctionService) FunctionSetResult(ctx context.Context, in *pb.FunctionSetResultRequest) (*pb.FunctionSetResultResponse, error)
type FunctionService ¶
type FunctionService interface {
pb.FunctionServiceServer
FunctionInvoke(in *pb.FunctionInvokeRequest, stream pb.FunctionService_FunctionInvokeServer) error
FunctionGetArgs(ctx context.Context, in *pb.FunctionGetArgsRequest) (*pb.FunctionGetArgsResponse, error)
FunctionSetResult(ctx context.Context, in *pb.FunctionSetResultRequest) (*pb.FunctionSetResultResponse, error)
}
func NewContainerFunctionService ¶
func NewContainerFunctionService(ctx context.Context, opts FunctionServiceOpts, ) (FunctionService, error)
type FunctionServiceOpts ¶
type FunctionServiceOpts struct {
Config types.AppConfig
RedisClient *common.RedisClient
BackendRepo repository.BackendRepository
WorkspaceRepo repository.WorkspaceRepository
TaskRepo repository.TaskRepository
ContainerRepo repository.ContainerRepository
Scheduler *scheduler.Scheduler
Tailscale *network.Tailscale
RouteGroup *echo.Group
TaskDispatcher *task.Dispatcher
EventRepo repository.EventRepository
UsageMetricsRepo repository.UsageMetricsRepository
}
type FunctionTask ¶
type FunctionTask struct {
// contains filtered or unexported fields
}
func (*FunctionTask) Cancel ¶
func (t *FunctionTask) Cancel(ctx context.Context, reason types.TaskCancellationReason) error
func (*FunctionTask) Execute ¶
func (t *FunctionTask) Execute(ctx context.Context, options ...interface{}) error
func (*FunctionTask) HeartBeat ¶
func (t *FunctionTask) HeartBeat(ctx context.Context) (bool, error)
func (*FunctionTask) Message ¶
func (t *FunctionTask) Message() *types.TaskMessage
func (*FunctionTask) Metadata ¶
func (t *FunctionTask) Metadata() types.TaskMetadata
Click to show internal directories.
Click to hide internal directories.