Documentation ¶
Index ¶
- func New(p *project.Project, envMap map[string]string) (*codeConfig, error)
- func ValidateUpRequest(request *deploy.DeployUpRequest) error
- type Api
- type BucketNotification
- type FunctionDependencies
- func (a *FunctionDependencies) AddApiHandler(aw *v1.ApiWorker)
- func (a *FunctionDependencies) AddApiSecurity(name string, security map[string]*v1.ApiScopes)
- func (a *FunctionDependencies) AddApiSecurityDefinitions(name string, sds map[string]*v1.ApiSecurityDefinition)
- func (a *FunctionDependencies) AddBucket(name string, b *v1.BucketResource)
- func (a *FunctionDependencies) AddBucketNotificationHandler(nw *v1.BucketNotificationWorker)
- func (a *FunctionDependencies) AddCollection(name string, c *v1.CollectionResource)
- func (a *FunctionDependencies) AddError(err string)
- func (a *FunctionDependencies) AddHttpWorker(hw *v1.HttpWorker)
- func (a *FunctionDependencies) AddPolicy(p *v1.PolicyResource)
- func (a *FunctionDependencies) AddQueue(name string, q *v1.QueueResource)
- func (a *FunctionDependencies) AddScheduleHandler(sw *v1.ScheduleWorker)
- func (a *FunctionDependencies) AddSecret(name string, s *v1.SecretResource)
- func (a *FunctionDependencies) AddSubscriptionHandler(sw *v1.SubscriptionWorker)
- func (a *FunctionDependencies) AddTopic(name string, t *v1.TopicResource)
- func (a *FunctionDependencies) AddWebsocketHandler(ws *v1.WebsocketWorker)
- func (a *FunctionDependencies) WorkerCount() int
- type HttpWorker
- type Server
- type SpecResult
- type TopicResult
- type Websocket
- type WebsocketResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateUpRequest ¶ added in v1.25.0
func ValidateUpRequest(request *deploy.DeployUpRequest) error
Types ¶
type Api ¶
type Api struct {
// contains filtered or unexported fields
}
func (*Api) AddSecurity ¶ added in v1.4.0
func (*Api) AddSecurityDefinition ¶ added in v1.4.0
func (a *Api) AddSecurityDefinition(name string, sd *v1.ApiSecurityDefinition)
type BucketNotification ¶ added in v1.18.0
type FunctionDependencies ¶
type FunctionDependencies struct {
// contains filtered or unexported fields
}
FunctionDependencies - Stores information about a Nitric Function, and it's dependencies
func NewFunction ¶
func NewFunction(name string, projectFunction project.Function) *FunctionDependencies
NewFunction - creates a new Nitric Function, ready to register handlers and dependencies.
func (*FunctionDependencies) AddApiHandler ¶
func (a *FunctionDependencies) AddApiHandler(aw *v1.ApiWorker)
func (*FunctionDependencies) AddApiSecurity ¶ added in v1.4.0
func (a *FunctionDependencies) AddApiSecurity(name string, security map[string]*v1.ApiScopes)
func (*FunctionDependencies) AddApiSecurityDefinitions ¶ added in v1.4.0
func (a *FunctionDependencies) AddApiSecurityDefinitions(name string, sds map[string]*v1.ApiSecurityDefinition)
func (*FunctionDependencies) AddBucket ¶
func (a *FunctionDependencies) AddBucket(name string, b *v1.BucketResource)
AddBucket - adds a storage bucket dependency to the function
func (*FunctionDependencies) AddBucketNotificationHandler ¶ added in v1.18.0
func (a *FunctionDependencies) AddBucketNotificationHandler(nw *v1.BucketNotificationWorker)
AddBucketNotificationHandler - registers a handler in the function that is triggered by bucket events
func (*FunctionDependencies) AddCollection ¶
func (a *FunctionDependencies) AddCollection(name string, c *v1.CollectionResource)
AddCollection - adds a document database collection dependency to the function
func (*FunctionDependencies) AddError ¶ added in v1.24.0
func (a *FunctionDependencies) AddError(err string)
func (*FunctionDependencies) AddHttpWorker ¶ added in v1.24.0
func (a *FunctionDependencies) AddHttpWorker(hw *v1.HttpWorker)
AddHttpWorker - registers a handler in the function that listens on a port
func (*FunctionDependencies) AddPolicy ¶
func (a *FunctionDependencies) AddPolicy(p *v1.PolicyResource)
AddPolicy - Adds an access policy dependency to the function
func (*FunctionDependencies) AddQueue ¶
func (a *FunctionDependencies) AddQueue(name string, q *v1.QueueResource)
AddQueue - adds a queue dependency to the function
func (*FunctionDependencies) AddScheduleHandler ¶
func (a *FunctionDependencies) AddScheduleHandler(sw *v1.ScheduleWorker)
AddScheduleHandler - registers a handler in the function that runs on a schedule
func (*FunctionDependencies) AddSecret ¶ added in v1.1.0
func (a *FunctionDependencies) AddSecret(name string, s *v1.SecretResource)
func (*FunctionDependencies) AddSubscriptionHandler ¶
func (a *FunctionDependencies) AddSubscriptionHandler(sw *v1.SubscriptionWorker)
AddSubscriptionHandler - registers a handler in the function that subscribes to a topic of events
func (*FunctionDependencies) AddTopic ¶
func (a *FunctionDependencies) AddTopic(name string, t *v1.TopicResource)
AddTopic - adds a pub/sub topic dependency to the function
func (*FunctionDependencies) AddWebsocketHandler ¶ added in v1.25.0
func (a *FunctionDependencies) AddWebsocketHandler(ws *v1.WebsocketWorker)
func (*FunctionDependencies) WorkerCount ¶ added in v1.2.0
func (a *FunctionDependencies) WorkerCount() int
type HttpWorker ¶ added in v1.24.0
type HttpWorker struct {
Port int `json:"port,omitempty"`
}
type Server ¶
type Server struct { v1.UnimplementedFaasServiceServer v1.UnimplementedResourceServiceServer // contains filtered or unexported fields }
func NewServer ¶
func NewServer(name string, function *FunctionDependencies) *Server
NewServer - Creates a new deployment server
func (*Server) Declare ¶
func (s *Server) Declare(ctx context.Context, req *v1.ResourceDeclareRequest) (*v1.ResourceDeclareResponse, error)
Declare - Accepts resource declarations, adding them as dependencies to the Function
func (*Server) TriggerStream ¶
func (s *Server) TriggerStream(stream v1.FaasService_TriggerStreamServer) error
TriggerStream - Starts a new FaaS server stream
The deployment server collects information from stream InitRequests, then immediately terminates the stream This behavior captures enough information to identify function handlers, without executing the handler code during the build process.
type SpecResult ¶ added in v1.16.0
type SpecResult struct { Apis []*openapi3.T Schedules []*TopicResult Topics []*TopicResult BucketNotifications []*BucketNotification HttpWorkers []*HttpWorker WebSockets []*WebsocketResult }
type TopicResult ¶ added in v1.16.0
type Websocket ¶ added in v1.25.0
type Websocket struct {
// contains filtered or unexported fields
}
func (*Websocket) AddWorker ¶ added in v1.25.0
func (a *Websocket) AddWorker(worker *v1.WebsocketWorker)