Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
admin_pb "github.com/microsoft/moc/rpc/common/admin"
compute_pb "github.com/microsoft/moc/rpc/nodeagent/compute"
network_pb "github.com/microsoft/moc/rpc/nodeagent/network"
node_pb "github.com/microsoft/moc/rpc/nodeagent/node"
security_pb "github.com/microsoft/moc/rpc/nodeagent/security"
storage_pb "github.com/microsoft/moc/rpc/nodeagent/storage"
)
Expand Down Expand Up @@ -398,3 +399,13 @@ func GetAuthenticationClient(serverAddress *string, authorizer auth.Authorizer)

return security_pb.NewAuthenticationAgentClient(conn), nil
}

// GetMocHostAgentClient returns the host agent client to communicate with the wssdagent
func GetMocHostAgentClient(serverAddress *string, authorizer auth.Authorizer) (node_pb.MocHostAgentClient, error) {
conn, err := getClientConnection(serverAddress, authorizer)
if err != nil {
log.Fatalf("Unable to get MocHostAgentClient. Failed to dial: %v", err)
}

return node_pb.NewMocHostAgentClient(conn), nil
}
Loading