Documentation ¶
Index ¶
- Constants
- func NewEvents(pool pool.WorkerPool, project *project.Project) (events.EventService, error)
- func NewQueueService() (queue.QueueService, error)
- func NewResources(ls *localServices, isStart bool) resource.ResourceService
- func NewSecretService() (secret.SecretService, error)
- type BaseHttpGateway
- func (s *BaseHttpGateway) GetApiAddresses() map[string]string
- func (s *BaseHttpGateway) GetHttpWorkerAddresses() map[int]string
- func (s *BaseHttpGateway) GetTriggerAddress() string
- func (s *BaseHttpGateway) GetWebsocketAddresses() map[string]string
- func (s *BaseHttpGateway) Refresh() error
- func (s *BaseHttpGateway) Start(pool pool.WorkerPool) error
- func (s *BaseHttpGateway) Stop() error
- type BoltDoc
- type BoltDocService
- func (s *BoltDocService) Delete(ctx context.Context, key *document.Key) error
- func (s *BoltDocService) Get(ctx context.Context, key *document.Key) (*document.Document, error)
- func (s *BoltDocService) Query(ctx context.Context, collection *document.Collection, ...) (*document.QueryResult, error)
- func (s *BoltDocService) QueryStream(ctx context.Context, collection *document.Collection, ...) document.DocumentIterator
- func (s *BoltDocService) Set(ctx context.Context, key *document.Key, content map[string]interface{}) error
- type BucketNotification
- type DevQueueService
- func (s *DevQueueService) Complete(ctx context.Context, queue string, leaseId string) error
- func (s *DevQueueService) Receive(ctx context.Context, options queue.ReceiveOptions) ([]queue.NitricTask, error)
- func (s *DevQueueService) Send(ctx context.Context, queue string, task queue.NitricTask) error
- func (s *DevQueueService) SendBatch(ctx context.Context, q string, tasks []queue.NitricTask) (*queue.SendBatchResponse, error)
- type DevSecretService
- type Function
- type FunctionOpts
- type HttpMiddleware
- type Item
- type LocalServices
- type LocalServicesStatus
- type RunProcessPool
- type RunResourcesService
- type RunStackState
- func (r *RunStackState) ApiTable(port int) (string, int)
- func (r *RunStackState) BucketNotificationsTable() (string, int)
- func (r *RunStackState) DashboardTable(port int) string
- func (r *RunStackState) HttpTable() (string, int)
- func (r *RunStackState) SchedulesTable() (string, int)
- func (r *RunStackState) Tables(port int, dashPort int) string
- func (r *RunStackState) TopicTable() (string, int)
- func (r *RunStackState) Update(workerPool pool.WorkerPool, ls LocalServices)
- func (r *RunStackState) Warnings() []string
- func (r *RunStackState) WebsocketsTable(port int) (string, int)
- type RunStorageService
- func (r *RunStorageService) Delete(ctx context.Context, bucket string, key string) error
- func (r *RunStorageService) ListFiles(ctx context.Context, bucket string, options *storage.ListFileOptions) ([]*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 RunWebsocketService
- func (r *RunWebsocketService) Close(ctx context.Context, socket string, connectionId string) error
- func (r *RunWebsocketService) RegisterConnection(socket string, connectionId string, connection *websocket.Conn) error
- func (r *RunWebsocketService) Send(ctx context.Context, socket string, connectionId string, message []byte) error
- type SeaweedServer
- type StorageOptions
- type WorkerEvent
- type WorkerEventType
- type WorkerListener
- type WorkerPoolEventService
Constants ¶
View Source
const DEV_SUB_DIR_COLL = "./collections/"
View Source
const DEV_SUB_DIR_QUEUES = "./queues/"
View Source
const DEV_SUB_DIR_SECRETS = "./secrets/"
Variables ¶
This section is empty.
Functions ¶
func NewEvents ¶
func NewEvents(pool pool.WorkerPool, project *project.Project) (events.EventService, error)
Create new Dev EventService
func NewQueueService ¶ added in v1.15.0
func NewQueueService() (queue.QueueService, error)
func NewResources ¶ added in v1.14.0
func NewResources(ls *localServices, isStart bool) resource.ResourceService
func NewSecretService ¶ added in v1.15.0
func NewSecretService() (secret.SecretService, error)
Create new secret store
Types ¶
type BaseHttpGateway ¶
type BaseHttpGateway struct { gateway.UnimplementedGatewayPlugin // contains filtered or unexported fields }
func NewGateway ¶
func NewGateway(wsPlugin *RunWebsocketService) (*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) GetHttpWorkerAddresses ¶ added in v1.24.0
func (s *BaseHttpGateway) GetHttpWorkerAddresses() map[int]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) GetWebsocketAddresses ¶ added in v1.25.0
func (s *BaseHttpGateway) GetWebsocketAddresses() map[string]string
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 pool.WorkerPool) error
func (*BaseHttpGateway) Stop ¶
func (s *BaseHttpGateway) Stop() error
type BoltDoc ¶ added in v1.15.0
type BoltDocService ¶ added in v1.15.0
type BoltDocService struct { document.UnimplementedDocumentPlugin // contains filtered or unexported fields }
func NewBoltService ¶ added in v1.15.0
func NewBoltService() (*BoltDocService, error)
New - Create a new dev KV plugin
func (*BoltDocService) Query ¶ added in v1.15.0
func (s *BoltDocService) Query(ctx context.Context, collection *document.Collection, expressions []document.QueryExpression, limit int, pagingToken map[string]string) (*document.QueryResult, error)
func (*BoltDocService) QueryStream ¶ added in v1.15.0
func (s *BoltDocService) QueryStream(ctx context.Context, collection *document.Collection, expressions []document.QueryExpression, limit int) document.DocumentIterator
type BucketNotification ¶ added in v1.18.0
type BucketNotification struct { Bucket string NotificationType v1.BucketNotificationType NotificationPrefixFilter string }
type DevQueueService ¶ added in v1.15.0
type DevQueueService struct { queue.UnimplementedQueuePlugin // contains filtered or unexported fields }
func (*DevQueueService) Receive ¶ added in v1.15.0
func (s *DevQueueService) Receive(ctx context.Context, options queue.ReceiveOptions) ([]queue.NitricTask, error)
func (*DevQueueService) Send ¶ added in v1.15.0
func (s *DevQueueService) Send(ctx context.Context, queue string, task queue.NitricTask) error
func (*DevQueueService) SendBatch ¶ added in v1.15.0
func (s *DevQueueService) SendBatch(ctx context.Context, q string, tasks []queue.NitricTask) (*queue.SendBatchResponse, error)
type DevSecretService ¶ added in v1.15.0
type DevSecretService struct { secret.UnimplementedSecretPlugin // contains filtered or unexported fields }
func (*DevSecretService) Access ¶ added in v1.15.0
func (s *DevSecretService) Access(ctx context.Context, sv *secret.SecretVersion) (*secret.SecretAccessResponse, error)
type FunctionOpts ¶
type FunctionOpts struct { Name string ProjectName string Handler string RunCtx string Runtime runtime.Runtime ContainerEngine containerengine.ContainerEngine }
type HttpMiddleware ¶
type HttpMiddleware func(*fasthttp.RequestCtx, pool.WorkerPool) bool
type LocalServices ¶
type LocalServices interface { Start(pool pool.WorkerPool) error Stop() error Running() bool Status() *LocalServicesStatus Refresh() error Apis() map[string]string HttpWorkers() map[int]string Websockets() map[string]string TriggerAddress() string GetWorkerPool() pool.WorkerPool GetDashPort() *int }
func NewLocalServices ¶
type LocalServicesStatus ¶
type RunProcessPool ¶
type RunProcessPool struct { pool.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) Declare ¶ added in v1.18.0
func (r *RunResourcesService) Declare(ctx context.Context, req resource.ResourceDeclareRequest) error
func (*RunResourcesService) Details ¶ added in v1.14.0
func (r *RunResourcesService) Details(ctx context.Context, typ resource.ResourceType, name string) (*resource.DetailsResponse[any], error)
type RunStackState ¶
type RunStackState struct {
// contains filtered or unexported fields
}
func NewStackState ¶
func NewStackState(proj *project.Project) *RunStackState
func (*RunStackState) BucketNotificationsTable ¶ added in v1.18.0
func (r *RunStackState) BucketNotificationsTable() (string, int)
func (*RunStackState) DashboardTable ¶ added in v1.16.0
func (r *RunStackState) DashboardTable(port int) string
func (*RunStackState) HttpTable ¶ added in v1.24.0
func (r *RunStackState) HttpTable() (string, int)
func (*RunStackState) SchedulesTable ¶
func (r *RunStackState) SchedulesTable() (string, int)
func (*RunStackState) Tables ¶ added in v1.12.0
func (r *RunStackState) Tables(port int, dashPort int) string
func (*RunStackState) TopicTable ¶
func (r *RunStackState) TopicTable() (string, int)
func (*RunStackState) Update ¶ added in v1.14.1
func (r *RunStackState) Update(workerPool pool.WorkerPool, ls LocalServices)
func (*RunStackState) Warnings ¶ added in v1.24.0
func (r *RunStackState) Warnings() []string
func (*RunStackState) WebsocketsTable ¶ added in v1.25.0
func (r *RunStackState) WebsocketsTable(port int) (string, int)
type RunStorageService ¶ added in v1.11.0
type RunStorageService struct { storage.StorageService // contains filtered or unexported fields }
func NewStorage ¶ added in v1.11.0
func NewStorage(opts StorageOptions, pool pool.WorkerPool) (*RunStorageService, error)
func (*RunStorageService) ListFiles ¶ added in v1.11.0
func (r *RunStorageService) ListFiles(ctx context.Context, bucket string, options *storage.ListFileOptions) ([]*storage.FileInfo, error)
func (*RunStorageService) PreSignUrl ¶ added in v1.11.0
type RunWebsocketService ¶ added in v1.25.0
type RunWebsocketService struct { nitricws.WebsocketService // contains filtered or unexported fields }
func NewRunWebsocketService ¶ added in v1.25.0
func NewRunWebsocketService(dash *dashboard.Dashboard) (*RunWebsocketService, error)
func (*RunWebsocketService) RegisterConnection ¶ added in v1.25.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.