agentsocket
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
- Variables
- type Client
- func (c *Client) Close() error
- func (c *Client) Ping(ctx context.Context) error
- func (c *Client) SyncComplete(ctx context.Context, unitName unit.ID) error
- func (c *Client) SyncReady(ctx context.Context, unitName unit.ID) (bool, error)
- func (c *Client) SyncStart(ctx context.Context, unitName unit.ID) error
- func (c *Client) SyncStatus(ctx context.Context, unitName unit.ID) (SyncStatusResponse, error)
- func (c *Client) SyncWant(ctx context.Context, unitName, dependsOn unit.ID) error
- type DRPCAgentSocketService
- func (*DRPCAgentSocketService) Ping(_ context.Context, _ *proto.PingRequest) (*proto.PingResponse, error)
- func (s *DRPCAgentSocketService) SyncComplete(_ context.Context, req *proto.SyncCompleteRequest) (*proto.SyncCompleteResponse, error)
- func (s *DRPCAgentSocketService) SyncReady(_ context.Context, req *proto.SyncReadyRequest) (*proto.SyncReadyResponse, error)
- func (s *DRPCAgentSocketService) SyncStart(_ context.Context, req *proto.SyncStartRequest) (*proto.SyncStartResponse, error)
- func (s *DRPCAgentSocketService) SyncStatus(_ context.Context, req *proto.SyncStatusRequest) (*proto.SyncStatusResponse, error)
- func (s *DRPCAgentSocketService) SyncWant(_ context.Context, req *proto.SyncWantRequest) (*proto.SyncWantResponse, error)
- type DependencyInfo
- type Option
- type Server
- type SyncStatusResponse
Constants¶
This section is empty.
Variables¶
var ErrUnitManagerNotAvailable =xerrors.New("unit manager not available")Functions¶
This section is empty.
Types¶
typeClient¶
type Client struct {// contains filtered or unexported fields}Client provides a client for communicating with the workspace agentsocket API.
funcNewClient¶
NewClient creates a new socket client and opens a connection to the socket.If path is not provided via WithPath or is empty, it will auto-discover thedefault socket path.
func (*Client)SyncComplete¶
SyncComplete marks a unit as complete in the dependency graph.
func (*Client)SyncReady¶
SyncReady requests whether a unit is ready to be started. That is, all dependencies are satisfied.
func (*Client)SyncStatus¶
SyncStatus gets the status of a unit and its dependencies.
typeDRPCAgentSocketService¶
type DRPCAgentSocketService struct {// contains filtered or unexported fields}DRPCAgentSocketService implements the DRPC agent socket service.
func (*DRPCAgentSocketService)Ping¶
func (*DRPCAgentSocketService) Ping(_context.Context, _ *proto.PingRequest) (*proto.PingResponse,error)
Ping responds to a ping request to check if the service is alive.
func (*DRPCAgentSocketService)SyncComplete¶
func (s *DRPCAgentSocketService) SyncComplete(_context.Context, req *proto.SyncCompleteRequest) (*proto.SyncCompleteResponse,error)
SyncComplete marks a unit as complete in the dependency graph.
func (*DRPCAgentSocketService)SyncReady¶
func (s *DRPCAgentSocketService) SyncReady(_context.Context, req *proto.SyncReadyRequest) (*proto.SyncReadyResponse,error)
SyncReady checks whether a unit is ready to be started. That is, all dependencies are satisfied.
func (*DRPCAgentSocketService)SyncStart¶
func (s *DRPCAgentSocketService) SyncStart(_context.Context, req *proto.SyncStartRequest) (*proto.SyncStartResponse,error)
SyncStart starts a unit in the dependency graph.
func (*DRPCAgentSocketService)SyncStatus¶
func (s *DRPCAgentSocketService) SyncStatus(_context.Context, req *proto.SyncStatusRequest) (*proto.SyncStatusResponse,error)
SyncStatus gets the status of a unit and lists its dependencies.
func (*DRPCAgentSocketService)SyncWant¶
func (s *DRPCAgentSocketService) SyncWant(_context.Context, req *proto.SyncWantRequest) (*proto.SyncWantResponse,error)
SyncWant declares a dependency between units.
typeDependencyInfo¶
type DependencyInfo struct {DependsOnunit.ID `table:"depends on,default_sort" json:"depends_on"`RequiredStatusunit.Status `table:"required status" json:"required_status"`CurrentStatusunit.Status `table:"current status" json:"current_status"`IsSatisfiedbool `table:"satisfied" json:"is_satisfied"`}DependencyInfo contains information about a unit dependency.
typeServer¶
type Server struct {// contains filtered or unexported fields}Server provides access to the DRPCAgentSocketService via a Unix domain socket.Do not invoke Server{} directly. Use NewServer() instead.
typeSyncStatusResponse¶
type SyncStatusResponse struct {UnitNameunit.ID `table:"unit,default_sort" json:"unit_name"`Statusunit.Status `table:"status" json:"status"`IsReadybool `table:"ready" json:"is_ready"`Dependencies []DependencyInfo `table:"dependencies" json:"dependencies"`}SyncStatusResponse contains the status information for a unit.