Documentation ¶
Index ¶
- func Populate(initial *stack.Stack) (*stack.Stack, error)
- type Api
- type CodeConfig
- type FunctionDependencies
- func (a *FunctionDependencies) AddApiHandler(aw *pb.ApiWorker) error
- func (a *FunctionDependencies) AddBucket(name string, b *pb.BucketResource)
- func (a *FunctionDependencies) AddCollection(name string, c *pb.CollectionResource)
- func (a *FunctionDependencies) AddPolicy(p *pb.PolicyResource)
- func (a *FunctionDependencies) AddQueue(name string, q *pb.QueueResource)
- func (a *FunctionDependencies) AddScheduleHandler(sw *pb.ScheduleWorker) error
- func (a *FunctionDependencies) AddSubscriptionHandler(sw *pb.SubscriptionWorker) error
- func (a *FunctionDependencies) AddTopic(name string, t *pb.TopicResource)
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CodeConfig ¶
CodeConfig - represents a collection of related functions and their shared dependencies.
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 *pb.ApiWorker) error
func (*FunctionDependencies) AddBucket ¶
func (a *FunctionDependencies) AddBucket(name string, b *pb.BucketResource)
AddBucket - adds a storage bucket dependency to the function
func (*FunctionDependencies) AddCollection ¶
func (a *FunctionDependencies) AddCollection(name string, c *pb.CollectionResource)
AddCollection - adds a document database collection dependency to the function
func (*FunctionDependencies) AddPolicy ¶
func (a *FunctionDependencies) AddPolicy(p *pb.PolicyResource)
AddPolicy - Adds an access policy dependency to the function
func (*FunctionDependencies) AddQueue ¶
func (a *FunctionDependencies) AddQueue(name string, q *pb.QueueResource)
AddQueue - adds a queue dependency to the function
func (*FunctionDependencies) AddScheduleHandler ¶
func (a *FunctionDependencies) AddScheduleHandler(sw *pb.ScheduleWorker) error
AddScheduleHandler - registers a handler in the function that runs on a schedule
func (*FunctionDependencies) AddSubscriptionHandler ¶
func (a *FunctionDependencies) AddSubscriptionHandler(sw *pb.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 *pb.TopicResource)
AddTopic - adds a pub/sub topic dependency to the function
type Server ¶
type Server struct { pb.UnimplementedFaasServiceServer pb.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 *pb.ResourceDeclareRequest) (*pb.ResourceDeclareResponse, error)
Declare - Accepts resource declarations, adding them as dependencies to the Function
func (*Server) TriggerStream ¶
func (s *Server) TriggerStream(stream pb.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.