grpcserver

package
v1.23.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 50 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateExtensionToken

func GenerateExtensionToken(extension *extensions.Extension, serverInfo *ServerInfo) (string, error)

GenerateExtensionToken generates a JWT token for the extension.

func NewAccountService

func NewAccountService(subscriptionsManager *account.SubscriptionsManager) azdext.AccountServiceServer

func NewAiModelService

func NewAiModelService(
	modelService *ai.AiModelService,
) azdext.AiModelServiceServer

NewAiModelService creates a new AI model gRPC service.

func NewComposeService

func NewComposeService(
	lazyAzdContext *lazy.Lazy[*azdcontext.AzdContext],
	lazyEnv *lazy.Lazy[*environment.Environment],
	lazyEnvManger *lazy.Lazy[environment.Manager],
) azdext.ComposeServiceServer

func NewContainerService

func NewContainerService(
	console input.Console,
	lazyContainerHelper *lazy.Lazy[*project.ContainerHelper],
	lazyServiceManager *lazy.Lazy[project.ServiceManager],
	lazyProjectConf *lazy.Lazy[*project.ProjectConfig],
	lazyEnvironment *lazy.Lazy[*environment.Environment],
) azdext.ContainerServiceServer

func NewCopilotService

func NewCopilotService(agentFactory agent.AgentFactory) azdext.CopilotServiceServer

NewCopilotService creates a new CopilotService gRPC server.

func NewDeploymentService

func NewDeploymentService(
	lazyAzdContext *lazy.Lazy[*azdcontext.AzdContext],
	lazyEnvManager *lazy.Lazy[environment.Manager],
	lazyProjectConfig *lazy.Lazy[*project.ProjectConfig],
	lazyBicepProvider *lazy.Lazy[*bicep.BicepProvider],
	azureDeploymentService azapi.DeploymentService,
) azdext.DeploymentServiceServer

func NewEnvironmentService

func NewEnvironmentService(
	lazyAzdContext *lazy.Lazy[*azdcontext.AzdContext],
	lazyEnvManager *lazy.Lazy[environment.Manager],
) azdext.EnvironmentServiceServer

func NewEventService

func NewEventService(
	extensionManager *extensions.Manager,
	lazyEnvManager *lazy.Lazy[environment.Manager],
	lazyProject *lazy.Lazy[*project.ProjectConfig],
	lazyEnv *lazy.Lazy[*environment.Environment],
	console input.Console,
) azdext.EventServiceServer

func NewExtensionService

func NewExtensionService(extensionManager *extensions.Manager) azdext.ExtensionServiceServer

NewExtensionService creates a new ExtensionService instance.

func NewFrameworkService

func NewFrameworkService(
	container *ioc.NestedContainer,
	extensionManager *extensions.Manager,
) azdext.FrameworkServiceServer

NewFrameworkService creates a new FrameworkService instance.

func NewProjectService

func NewProjectService(
	lazyAzdContext *lazy.Lazy[*azdcontext.AzdContext],
	lazyEnvManager *lazy.Lazy[environment.Manager],
	lazyResourceManager *lazy.Lazy[project.ResourceManager],
	lazyEnv *lazy.Lazy[*environment.Environment],
	lazyProjectConfig *lazy.Lazy[*project.ProjectConfig],
	importManager *project.ImportManager,
	ghCli *github.Cli,
) azdext.ProjectServiceServer

NewProjectService creates a new project service instance with lazy-loaded dependencies. The service provides gRPC methods for managing Azure Developer CLI projects, including project configuration, service management, and extension configuration through AdditionalProperties.

Parameters:

  • lazyAzdContext: Lazy-loaded Azure Developer CLI context for project directory operations
  • lazyEnvManager: Lazy-loaded environment manager for handling Azure environments
  • lazyResourceManager: Lazy-loaded resource manager for resolving target resources
  • lazyEnv: Lazy-loaded environment for accessing environment variables and subscription info
  • lazyProjectConfig: Lazy-loaded project configuration for accessing project settings

Returns an implementation of azdext.ProjectServiceServer.

func NewPromptService

func NewPromptService(
	prompter prompt.PromptService,
	resourceService *azapi.ResourceService,
	aiModelService *ai.AiModelService,
	globalOptions *internal.GlobalCommandOptions,
) azdext.PromptServiceServer

func NewServiceTargetService

func NewServiceTargetService(
	container *ioc.NestedContainer,
	extensionManager *extensions.Manager,
	lazyEnv *lazy.Lazy[*environment.Environment],
) azdext.ServiceTargetServiceServer

NewServiceTargetService creates a new ServiceTargetService instance.

func NewUserConfigService

func NewUserConfigService(userConfigManager config.UserConfigManager) (azdext.UserConfigServiceServer, error)

NewConfigService creates a new instance of configService.

func NewWorkflowService

func NewWorkflowService(runner *workflow.Runner) azdext.WorkflowServiceServer

NewWorkflowService creates a new instance of the workflow service.

func ParseExtensionToken

func ParseExtensionToken(tokenValue string, serverInfo *ServerInfo) (*extensions.ExtensionClaims, error)

ParseExtensionToken parses and validates the extension token.

Types

type ExtensionService

type ExtensionService struct {
	azdext.UnimplementedExtensionServiceServer
	// contains filtered or unexported fields
}

ExtensionService implements azdext.ExtensionServiceServer.

func (*ExtensionService) Ready

Ready signals that the extension is done registering all capabilities. The extension will remain alive as long as its streams are active and context is not cancelled.

func (*ExtensionService) ReportError

ReportError receives a structured error from the extension and stores it so the host can retrieve it after the extension process exits.

type FrameworkService

type FrameworkService struct {
	azdext.UnimplementedFrameworkServiceServer
	// contains filtered or unexported fields
}

FrameworkService implements azdext.FrameworkServiceServer.

func (*FrameworkService) Stream

Stream handles the bi-directional streaming for framework service operations.

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(
	projectService azdext.ProjectServiceServer,
	environmentService azdext.EnvironmentServiceServer,
	promptService azdext.PromptServiceServer,
	userConfigService azdext.UserConfigServiceServer,
	deploymentService azdext.DeploymentServiceServer,
	eventService azdext.EventServiceServer,
	composeService azdext.ComposeServiceServer,
	workflowService azdext.WorkflowServiceServer,
	extensionService azdext.ExtensionServiceServer,
	serviceTargetService azdext.ServiceTargetServiceServer,
	frameworkService azdext.FrameworkServiceServer,
	containerService azdext.ContainerServiceServer,
	accountService azdext.AccountServiceServer,
	aiModelService azdext.AiModelServiceServer,
	copilotService azdext.CopilotServiceServer,
) *Server

func (*Server) Start

func (s *Server) Start() (*ServerInfo, error)

func (*Server) Stop

func (s *Server) Stop() error

type ServerInfo

type ServerInfo struct {
	Address    string
	Port       int
	SigningKey []byte
}

type ServiceTargetService

type ServiceTargetService struct {
	azdext.UnimplementedServiceTargetServiceServer
	// contains filtered or unexported fields
}

ServiceTargetService implements azdext.ServiceTargetServiceServer.

func (*ServiceTargetService) Stream

Stream handles the bi-directional streaming for service target operations.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL