Documentation ¶
Index ¶
- Constants
- type Service
- func (s *Service) Build(ctx context.Context, req *connect.Request[langpb.BuildRequest], ...) error
- func (s *Service) BuildContextUpdated(ctx context.Context, req *connect.Request[langpb.BuildContextUpdatedRequest]) (*connect.Response[langpb.BuildContextUpdatedResponse], error)
- func (s *Service) CreateModule(ctx context.Context, req *connect.Request[langpb.CreateModuleRequest]) (*connect.Response[langpb.CreateModuleResponse], error)
- func (s *Service) GenerateStubs(ctx context.Context, req *connect.Request[langpb.GenerateStubsRequest]) (*connect.Response[langpb.GenerateStubsResponse], error)
- func (s *Service) GetCreateModuleFlags(ctx context.Context, req *connect.Request[langpb.GetCreateModuleFlagsRequest]) (*connect.Response[langpb.GetCreateModuleFlagsResponse], error)
- func (s *Service) GetDependencies(ctx context.Context, req *connect.Request[langpb.DependenciesRequest]) (*connect.Response[langpb.DependenciesResponse], error)
- func (s *Service) ModuleConfigDefaults(ctx context.Context, req *connect.Request[langpb.ModuleConfigDefaultsRequest]) (*connect.Response[langpb.ModuleConfigDefaultsResponse], error)
- func (s *Service) Ping(ctx context.Context, req *connect.Request[ftlv1.PingRequest]) (*connect.Response[ftlv1.PingResponse], error)
- func (s *Service) SyncStubReferences(ctx context.Context, req *connect.Request[langpb.SyncStubReferencesRequest]) (*connect.Response[langpb.SyncStubReferencesResponse], error)
Constants ¶
const BuildLockTimeout = time.Minute
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) Build ¶
func (s *Service) Build(ctx context.Context, req *connect.Request[langpb.BuildRequest], stream *connect.ServerStream[langpb.BuildEvent]) error
Build the module and stream back build events.
A BuildSuccess or BuildFailure event must be streamed back with the request's context id to indicate the end of the build.
The request can include the option to "rebuild_automatically". In this case the plugin should watch for file changes and automatically rebuild as needed as long as this build request is alive. Each automactic rebuild must include the latest build context id provided by the request or subsequent BuildContextUpdated calls.
func (*Service) BuildContextUpdated ¶
func (s *Service) BuildContextUpdated(ctx context.Context, req *connect.Request[langpb.BuildContextUpdatedRequest]) (*connect.Response[langpb.BuildContextUpdatedResponse], error)
BuildContextUpdated is called whenever the build context is update while a Build call with "rebuild_automatically" is active.
Each time this call is made, the Build call must send back a corresponding BuildSuccess or BuildFailure event with the updated build context id with "is_automatic_rebuild" as false.
func (*Service) CreateModule ¶
func (s *Service) CreateModule(ctx context.Context, req *connect.Request[langpb.CreateModuleRequest]) (*connect.Response[langpb.CreateModuleResponse], error)
CreateModule generates files for a new module with the requested name
func (*Service) GenerateStubs ¶
func (*Service) GetCreateModuleFlags ¶
func (*Service) GetDependencies ¶
func (s *Service) GetDependencies(ctx context.Context, req *connect.Request[langpb.DependenciesRequest]) (*connect.Response[langpb.DependenciesResponse], error)
GetDependencies extracts dependencies for a module
func (*Service) ModuleConfigDefaults ¶
func (s *Service) ModuleConfigDefaults(ctx context.Context, req *connect.Request[langpb.ModuleConfigDefaultsRequest]) (*connect.Response[langpb.ModuleConfigDefaultsResponse], error)
ModuleConfigDefaults provides default values for ModuleConfig for values that are not configured in the ftl.toml file.