Documentation ¶
Index ¶
- func New(p *project.Project, envMap map[string]string) (*codeConfig, error)
- type Api
- type FunctionDependencies
- func (a *FunctionDependencies) AddApiHandler(aw *v1.ApiWorker) error
- 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) AddCollection(name string, c *v1.CollectionResource)
- func (a *FunctionDependencies) AddPolicy(p *v1.PolicyResource)
- func (a *FunctionDependencies) AddQueue(name string, q *v1.QueueResource)
- func (a *FunctionDependencies) AddScheduleHandler(sw *v1.ScheduleWorker) error
- func (a *FunctionDependencies) AddSecret(name string, s *v1.SecretResource)
- func (a *FunctionDependencies) AddSubscriptionHandler(sw *v1.SubscriptionWorker) error
- func (a *FunctionDependencies) AddTopic(name string, t *v1.TopicResource)
- func (a *FunctionDependencies) WorkerCount() int
- type Server
- type SpecResult
- type TopicResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 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) *FunctionDependencies
NewFunction - creates a new Nitric Function, ready to register handlers and dependencies.
func (*FunctionDependencies) AddApiHandler ¶
func (a *FunctionDependencies) AddApiHandler(aw *v1.ApiWorker) error
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) AddCollection ¶
func (a *FunctionDependencies) AddCollection(name string, c *v1.CollectionResource)
AddCollection - adds a document database collection dependency to the function
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) error
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) error
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) WorkerCount ¶ added in v1.2.0
func (a *FunctionDependencies) WorkerCount() int
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 Shedules []*TopicResult }