mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-06 13:18:58 +00:00
feat(push): stub for 'image push' command and Dialer interface for cluster connectors
This commit is contained in:
1 parent
1a1afece7d
commit
9f6880b701
7 files changed
+87
-1
No files matched your search
@@ -10,6 +10,7 @@ import (
|
||||
"github.com/psviderski/uncloud/internal/machine/api/pb"
|
||||
"github.com/psviderski/uncloud/internal/machine/docker"
|
||||
"github.com/psviderski/uncloud/pkg/api"
|
||||
"golang.org/x/net/proxy"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/metadata"
|
||||
)
|
||||
@@ -31,9 +32,12 @@ type Client struct {
|
||||
|
||||
var _ api.Client = (*Client)(nil)
|
||||
|
||||
// Connector is an interface for establishing a connection to the machine API.
|
||||
// Connector is an interface for establishing a connection to the cluster.
|
||||
type Connector interface {
|
||||
// Connect establishes a gRPC client connection to the machine API.
|
||||
Connect(ctx context.Context) (*grpc.ClientConn, error)
|
||||
// Dialer returns a proxy dialer for establishing connections within the cluster if supported by the connector.
|
||||
Dialer() (proxy.ContextDialer, error)
|
||||
Close() error
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user