Documentation ¶
Index ¶
- func NewEvents(pool worker.WorkerPool) (events.EventService, error)
- func NewResources(gw *BaseHttpGateway, isStart bool) common.ResourceService
- func NewStorage(opts StorageOptions) (storage.StorageService, error)
- type BaseHttpGateway
- type Function
- type FunctionOpts
- type HttpMiddleware
- type LocalServices
- type LocalServicesStatus
- type RunProcessPool
- type RunResourcesService
- type RunStackState
- type RunStorageService
- func (r *RunStorageService) Delete(ctx context.Context, bucket string, key string) error
- func (r *RunStorageService) ListFiles(ctx context.Context, bucket string) ([]*storage.FileInfo, error)
- func (r *RunStorageService) PreSignUrl(ctx context.Context, bucket string, key string, operation storage.Operation, ...) (string, error)
- func (r *RunStorageService) Read(ctx context.Context, bucket string, key string) ([]byte, error)
- func (r *RunStorageService) Write(ctx context.Context, bucket string, key string, object []byte) error
- type SeaweedServer
- type StorageOptions
- type WorkerEvent
- type WorkerEventType
- type WorkerListener
- type WorkerPoolEventService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEvents ¶
func NewEvents(pool worker.WorkerPool) (events.EventService, error)
Create new Dev EventService
func NewResources ¶ added in v1.14.0
func NewResources(gw *BaseHttpGateway, isStart bool) common.ResourceService
func NewStorage ¶ added in v1.11.0
func NewStorage(opts StorageOptions) (storage.StorageService, error)
Types ¶
type BaseHttpGateway ¶
type BaseHttpGateway struct { gateway.UnimplementedGatewayPlugin // contains filtered or unexported fields }
func NewGateway ¶
func NewGateway() (*BaseHttpGateway, error)
Create new HTTP gateway XXX: No External Args for function atm (currently the plugin loader does not pass any argument information)
func (*BaseHttpGateway) GetApiAddresses ¶ added in v1.14.1
func (s *BaseHttpGateway) GetApiAddresses() map[string]string
func (*BaseHttpGateway) GetTriggerAddress ¶ added in v1.14.1
func (s *BaseHttpGateway) GetTriggerAddress() string
GetTriggerAddress - Returns the address built-in nitric services this can be used to publishing messages to topics or triggering schedules
func (*BaseHttpGateway) Refresh ¶ added in v1.14.1
func (s *BaseHttpGateway) Refresh() error
Update the gateway and API based on the worker pool
func (*BaseHttpGateway) Start ¶
func (s *BaseHttpGateway) Start(pool worker.WorkerPool) error
func (*BaseHttpGateway) Stop ¶
func (s *BaseHttpGateway) Stop() error
type FunctionOpts ¶
type FunctionOpts struct { Name string ProjectName string Handler string RunCtx string ContainerEngine containerengine.ContainerEngine }
type HttpMiddleware ¶
type HttpMiddleware func(*fasthttp.RequestCtx, worker.WorkerPool) bool
type LocalServices ¶
type LocalServices interface { Start(pool worker.WorkerPool) error Stop() error Running() bool Status() *LocalServicesStatus Refresh() error Apis() map[string]string TriggerAddress() string }
func NewLocalServices ¶
func NewLocalServices(s *project.Project, isStart bool) LocalServices
type LocalServicesStatus ¶
type RunProcessPool ¶
type RunProcessPool struct { worker.WorkerPool // contains filtered or unexported fields }
func NewRunProcessPool ¶
func NewRunProcessPool() *RunProcessPool
func (*RunProcessPool) Listen ¶
func (r *RunProcessPool) Listen(l WorkerListener)
func (*RunProcessPool) RemoveWorker ¶
func (r *RunProcessPool) RemoveWorker(w worker.Worker) error
type RunResourcesService ¶ added in v1.14.0
type RunResourcesService struct {
// contains filtered or unexported fields
}
func (*RunResourcesService) Details ¶ added in v1.14.0
func (r *RunResourcesService) Details(ctx context.Context, typ common.ResourceType, name string) (*common.DetailsResponse[any], error)
type RunStackState ¶
type RunStackState struct {
// contains filtered or unexported fields
}
func NewStackState ¶
func NewStackState() *RunStackState
func (*RunStackState) SchedulesTable ¶
func (r *RunStackState) SchedulesTable(port int) (string, int)
func (*RunStackState) Tables ¶ added in v1.12.0
func (r *RunStackState) Tables(port int) string
func (*RunStackState) TopicTable ¶
func (r *RunStackState) TopicTable(port int) (string, int)
func (*RunStackState) Update ¶ added in v1.14.1
func (r *RunStackState) Update(pool worker.WorkerPool, ls LocalServices)
type RunStorageService ¶ added in v1.11.0
type RunStorageService struct { storage.StorageService // contains filtered or unexported fields }
func (*RunStorageService) PreSignUrl ¶ added in v1.11.0
type SeaweedServer ¶ added in v1.14.0
type SeaweedServer struct {
// contains filtered or unexported fields
}
func NewSeaweed ¶ added in v1.14.0
func NewSeaweed(runDir string) (*SeaweedServer, error)
func (*SeaweedServer) GetApiPort ¶ added in v1.14.0
func (m *SeaweedServer) GetApiPort() int
func (*SeaweedServer) Start ¶ added in v1.14.0
func (m *SeaweedServer) Start() error
Start - Start the local SeaweedFS server
func (*SeaweedServer) Stop ¶ added in v1.14.0
func (m *SeaweedServer) Stop() error
type StorageOptions ¶ added in v1.14.0
type WorkerEvent ¶
type WorkerEvent struct { Type WorkerEventType Worker worker.Worker }
type WorkerEventType ¶
type WorkerEventType string
const ( WorkerEventType_Add WorkerEventType = "add" WorkerEventType_Remove WorkerEventType = "remove" )
type WorkerListener ¶
type WorkerListener = func(WorkerEvent)
type WorkerPoolEventService ¶
type WorkerPoolEventService struct { events.UnimplementedeventsPlugin // contains filtered or unexported fields }
func (*WorkerPoolEventService) Publish ¶
func (s *WorkerPoolEventService) Publish(ctx context.Context, topic string, delay int, event *events.NitricEvent) error
Publish a message to a given topic
Click to show internal directories.
Click to hide internal directories.