v0connect

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CLIPingProcedure is the fully-qualified name of the CLI's Ping RPC.
	CLIPingProcedure = "/codefly.cli.v0.CLI/Ping"
	// CLIGetAgentInformationProcedure is the fully-qualified name of the CLI's GetAgentInformation RPC.
	CLIGetAgentInformationProcedure = "/codefly.cli.v0.CLI/GetAgentInformation"
	// CLIGetWorkspaceInventoryProcedure is the fully-qualified name of the CLI's GetWorkspaceInventory
	// RPC.
	CLIGetWorkspaceInventoryProcedure = "/codefly.cli.v0.CLI/GetWorkspaceInventory"
	// CLIGetWorkspaceServiceDependencyGraphProcedure is the fully-qualified name of the CLI's
	// GetWorkspaceServiceDependencyGraph RPC.
	CLIGetWorkspaceServiceDependencyGraphProcedure = "/codefly.cli.v0.CLI/GetWorkspaceServiceDependencyGraph"
	// CLIGetWorkspacePublicModulesDependencyGraphProcedure is the fully-qualified name of the CLI's
	// GetWorkspacePublicModulesDependencyGraph RPC.
	CLIGetWorkspacePublicModulesDependencyGraphProcedure = "/codefly.cli.v0.CLI/GetWorkspacePublicModulesDependencyGraph"
	// CLIGetActiveProcedure is the fully-qualified name of the CLI's GetActive RPC.
	CLIGetActiveProcedure = "/codefly.cli.v0.CLI/GetActive"
	// CLIGetAddressesProcedure is the fully-qualified name of the CLI's GetAddresses RPC.
	CLIGetAddressesProcedure = "/codefly.cli.v0.CLI/GetAddresses"
	// CLIGetConfigurationProcedure is the fully-qualified name of the CLI's GetConfiguration RPC.
	CLIGetConfigurationProcedure = "/codefly.cli.v0.CLI/GetConfiguration"
	// CLIGetDependenciesConfigurationsProcedure is the fully-qualified name of the CLI's
	// GetDependenciesConfigurations RPC.
	CLIGetDependenciesConfigurationsProcedure = "/codefly.cli.v0.CLI/GetDependenciesConfigurations"
	// CLIGetDependenciesNetworkMappingsProcedure is the fully-qualified name of the CLI's
	// GetDependenciesNetworkMappings RPC.
	CLIGetDependenciesNetworkMappingsProcedure = "/codefly.cli.v0.CLI/GetDependenciesNetworkMappings"
	// CLIGetRuntimeConfigurationsProcedure is the fully-qualified name of the CLI's
	// GetRuntimeConfigurations RPC.
	CLIGetRuntimeConfigurationsProcedure = "/codefly.cli.v0.CLI/GetRuntimeConfigurations"
	// CLILogsProcedure is the fully-qualified name of the CLI's Logs RPC.
	CLILogsProcedure = "/codefly.cli.v0.CLI/Logs"
	// CLIActiveLogHistoryProcedure is the fully-qualified name of the CLI's ActiveLogHistory RPC.
	CLIActiveLogHistoryProcedure = "/codefly.cli.v0.CLI/ActiveLogHistory"
	// CLIGetFlowStatusProcedure is the fully-qualified name of the CLI's GetFlowStatus RPC.
	CLIGetFlowStatusProcedure = "/codefly.cli.v0.CLI/GetFlowStatus"
	// CLIStopFlowProcedure is the fully-qualified name of the CLI's StopFlow RPC.
	CLIStopFlowProcedure = "/codefly.cli.v0.CLI/StopFlow"
	// CLIDestroyFlowProcedure is the fully-qualified name of the CLI's DestroyFlow RPC.
	CLIDestroyFlowProcedure = "/codefly.cli.v0.CLI/DestroyFlow"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// TerminalServiceOpenProcedure is the fully-qualified name of the TerminalService's Open RPC.
	TerminalServiceOpenProcedure = "/codefly.cli.v0.TerminalService/Open"
	// TerminalServiceAttachProcedure is the fully-qualified name of the TerminalService's Attach RPC.
	TerminalServiceAttachProcedure = "/codefly.cli.v0.TerminalService/Attach"
	// TerminalServiceResizeProcedure is the fully-qualified name of the TerminalService's Resize RPC.
	TerminalServiceResizeProcedure = "/codefly.cli.v0.TerminalService/Resize"
	// TerminalServiceCloseProcedure is the fully-qualified name of the TerminalService's Close RPC.
	TerminalServiceCloseProcedure = "/codefly.cli.v0.TerminalService/Close"
	// TerminalServiceListProcedure is the fully-qualified name of the TerminalService's List RPC.
	TerminalServiceListProcedure = "/codefly.cli.v0.TerminalService/List"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// CLIName is the fully-qualified name of the CLI service.
	CLIName = "codefly.cli.v0.CLI"
)
View Source
const (
	// TerminalServiceName is the fully-qualified name of the TerminalService service.
	TerminalServiceName = "codefly.cli.v0.TerminalService"
)

Variables

This section is empty.

Functions

func NewCLIHandler

func NewCLIHandler(svc CLIHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewCLIHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

func NewTerminalServiceHandler

func NewTerminalServiceHandler(svc TerminalServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewTerminalServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

Types

type CLIClient

type CLIClient interface {
	// Ping checks that the CLI bridge is reachable.
	Ping(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[emptypb.Empty], error)
	// GetAgentInformation returns metadata and documentation for an installed agent.
	GetAgentInformation(context.Context, *connect.Request[v0.GetAgentInformationRequest]) (*connect.Response[v01.AgentInformation], error)
	// GetWorkspaceInventory returns the loaded workspace resource tree.
	GetWorkspaceInventory(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v02.Workspace], error)
	// GetWorkspaceServiceDependencyGraph returns the service dependency DAG for the workspace.
	GetWorkspaceServiceDependencyGraph(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v03.GraphResponse], error)
	// GetWorkspacePublicModulesDependencyGraph returns graphs of public module-facing endpoints.
	GetWorkspacePublicModulesDependencyGraph(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v0.MultiGraphResponse], error)
	// GetActive returns the CLI's current workspace/module/service selection.
	GetActive(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v0.ActiveResponse], error)
	// GetAddresses returns the concrete address for a service endpoint.
	GetAddresses(context.Context, *connect.Request[v0.GetAddressRequest]) (*connect.Response[v0.GetAddressResponse], error)
	// GetConfiguration returns configuration declared by the target service.
	GetConfiguration(context.Context, *connect.Request[v0.GetConfigurationRequest]) (*connect.Response[v0.GetConfigurationResponse], error)
	// GetDependenciesConfigurations returns configuration exposed by upstream services.
	GetDependenciesConfigurations(context.Context, *connect.Request[v0.GetConfigurationRequest]) (*connect.Response[v0.GetConfigurationsResponse], error)
	// GetDependenciesNetworkMappings returns network mappings exposed by upstream services.
	GetDependenciesNetworkMappings(context.Context, *connect.Request[v0.GetNetworkMappingsRequest]) (*connect.Response[v0.GetNetworkMappingsResponse], error)
	// GetRuntimeConfigurations returns configuration produced by a running service.
	GetRuntimeConfigurations(context.Context, *connect.Request[v0.GetConfigurationRequest]) (*connect.Response[v0.GetConfigurationsResponse], error)
	// Logs streams live workspace log events.
	Logs(context.Context, *connect.Request[emptypb.Empty]) (*connect.ServerStreamForClient[v03.Log], error)
	// ActiveLogHistory returns persisted log events for the active workspace session.
	ActiveLogHistory(context.Context, *connect.Request[v03.LogRequest]) (*connect.Response[v03.LogResponse], error)
	// GetFlowStatus reports readiness for the active orchestration flow.
	GetFlowStatus(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v0.FlowStatus], error)
	// StopFlow stops the active orchestration flow.
	StopFlow(context.Context, *connect.Request[v0.StopFlowRequest]) (*connect.Response[v0.StopFlowResponse], error)
	// DestroyFlow tears down resources owned by the active orchestration flow.
	DestroyFlow(context.Context, *connect.Request[v0.DestroyFlowRequest]) (*connect.Response[v0.DestroyFlowResponse], error)
}

CLIClient is a client for the codefly.cli.v0.CLI service.

func NewCLIClient

func NewCLIClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) CLIClient

NewCLIClient constructs a client for the codefly.cli.v0.CLI service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type CLIHandler

type CLIHandler interface {
	// Ping checks that the CLI bridge is reachable.
	Ping(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[emptypb.Empty], error)
	// GetAgentInformation returns metadata and documentation for an installed agent.
	GetAgentInformation(context.Context, *connect.Request[v0.GetAgentInformationRequest]) (*connect.Response[v01.AgentInformation], error)
	// GetWorkspaceInventory returns the loaded workspace resource tree.
	GetWorkspaceInventory(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v02.Workspace], error)
	// GetWorkspaceServiceDependencyGraph returns the service dependency DAG for the workspace.
	GetWorkspaceServiceDependencyGraph(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v03.GraphResponse], error)
	// GetWorkspacePublicModulesDependencyGraph returns graphs of public module-facing endpoints.
	GetWorkspacePublicModulesDependencyGraph(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v0.MultiGraphResponse], error)
	// GetActive returns the CLI's current workspace/module/service selection.
	GetActive(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v0.ActiveResponse], error)
	// GetAddresses returns the concrete address for a service endpoint.
	GetAddresses(context.Context, *connect.Request[v0.GetAddressRequest]) (*connect.Response[v0.GetAddressResponse], error)
	// GetConfiguration returns configuration declared by the target service.
	GetConfiguration(context.Context, *connect.Request[v0.GetConfigurationRequest]) (*connect.Response[v0.GetConfigurationResponse], error)
	// GetDependenciesConfigurations returns configuration exposed by upstream services.
	GetDependenciesConfigurations(context.Context, *connect.Request[v0.GetConfigurationRequest]) (*connect.Response[v0.GetConfigurationsResponse], error)
	// GetDependenciesNetworkMappings returns network mappings exposed by upstream services.
	GetDependenciesNetworkMappings(context.Context, *connect.Request[v0.GetNetworkMappingsRequest]) (*connect.Response[v0.GetNetworkMappingsResponse], error)
	// GetRuntimeConfigurations returns configuration produced by a running service.
	GetRuntimeConfigurations(context.Context, *connect.Request[v0.GetConfigurationRequest]) (*connect.Response[v0.GetConfigurationsResponse], error)
	// Logs streams live workspace log events.
	Logs(context.Context, *connect.Request[emptypb.Empty], *connect.ServerStream[v03.Log]) error
	// ActiveLogHistory returns persisted log events for the active workspace session.
	ActiveLogHistory(context.Context, *connect.Request[v03.LogRequest]) (*connect.Response[v03.LogResponse], error)
	// GetFlowStatus reports readiness for the active orchestration flow.
	GetFlowStatus(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v0.FlowStatus], error)
	// StopFlow stops the active orchestration flow.
	StopFlow(context.Context, *connect.Request[v0.StopFlowRequest]) (*connect.Response[v0.StopFlowResponse], error)
	// DestroyFlow tears down resources owned by the active orchestration flow.
	DestroyFlow(context.Context, *connect.Request[v0.DestroyFlowRequest]) (*connect.Response[v0.DestroyFlowResponse], error)
}

CLIHandler is an implementation of the codefly.cli.v0.CLI service.

type TerminalServiceClient

type TerminalServiceClient interface {
	// Open creates a new PTY-backed terminal session scoped to the requested workspace context.
	Open(context.Context, *connect.Request[v0.OpenTerminalRequest]) (*connect.Response[v0.OpenTerminalResponse], error)
	// Attach streams raw input bytes to the PTY and raw output bytes back to the client.
	Attach(context.Context) *connect.BidiStreamForClient[v0.TerminalInput, v0.TerminalOutput]
	// Resize changes the PTY dimensions for an active terminal session.
	Resize(context.Context, *connect.Request[v0.ResizeTerminalRequest]) (*connect.Response[v0.ResizeTerminalResponse], error)
	// Close terminates an active terminal session.
	Close(context.Context, *connect.Request[v0.CloseTerminalRequest]) (*connect.Response[v0.CloseTerminalResponse], error)
	// List returns active terminal sessions known to the CLI server.
	List(context.Context, *connect.Request[v0.ListTerminalsRequest]) (*connect.Response[v0.ListTerminalsResponse], error)
}

TerminalServiceClient is a client for the codefly.cli.v0.TerminalService service.

func NewTerminalServiceClient

func NewTerminalServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) TerminalServiceClient

NewTerminalServiceClient constructs a client for the codefly.cli.v0.TerminalService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type TerminalServiceHandler

type TerminalServiceHandler interface {
	// Open creates a new PTY-backed terminal session scoped to the requested workspace context.
	Open(context.Context, *connect.Request[v0.OpenTerminalRequest]) (*connect.Response[v0.OpenTerminalResponse], error)
	// Attach streams raw input bytes to the PTY and raw output bytes back to the client.
	Attach(context.Context, *connect.BidiStream[v0.TerminalInput, v0.TerminalOutput]) error
	// Resize changes the PTY dimensions for an active terminal session.
	Resize(context.Context, *connect.Request[v0.ResizeTerminalRequest]) (*connect.Response[v0.ResizeTerminalResponse], error)
	// Close terminates an active terminal session.
	Close(context.Context, *connect.Request[v0.CloseTerminalRequest]) (*connect.Response[v0.CloseTerminalResponse], error)
	// List returns active terminal sessions known to the CLI server.
	List(context.Context, *connect.Request[v0.ListTerminalsRequest]) (*connect.Response[v0.ListTerminalsResponse], error)
}

TerminalServiceHandler is an implementation of the codefly.cli.v0.TerminalService service.

type UnimplementedCLIHandler

type UnimplementedCLIHandler struct{}

UnimplementedCLIHandler returns CodeUnimplemented from all methods.

func (UnimplementedCLIHandler) ActiveLogHistory

func (UnimplementedCLIHandler) GetFlowStatus

func (UnimplementedCLIHandler) GetWorkspaceInventory

func (UnimplementedCLIHandler) GetWorkspacePublicModulesDependencyGraph

func (UnimplementedCLIHandler) GetWorkspacePublicModulesDependencyGraph(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v0.MultiGraphResponse], error)

func (UnimplementedCLIHandler) GetWorkspaceServiceDependencyGraph

type UnimplementedTerminalServiceHandler

type UnimplementedTerminalServiceHandler struct{}

UnimplementedTerminalServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedTerminalServiceHandler) Attach

Jump to

Keyboard shortcuts

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