Skip to content

Commit 2d8f5fd

Browse files
authored
Merge branch 'main' into update_config
2 parents 2f686e2 + 28a10d8 commit 2d8f5fd

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

sdk/go-sdk/client/client.go

+7-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package client
1919
import (
2020
"context"
2121
"log"
22+
"mosn.io/layotto/spec/proto/extension/v1/s3"
2223
"net"
2324
"os"
2425
"sync"
@@ -116,6 +117,8 @@ type Client interface {
116117

117118
// Close cleans up all resources created by the client.
118119
Close()
120+
121+
s3.ObjectStorageServiceClient
119122
}
120123

121124
// NewClient instantiates runtime client using runtime_GRPC_PORT environment variable as port.
@@ -165,13 +168,15 @@ func NewClientWithAddress(address string) (client Client, err error) {
165168
// NewClientWithConnection instantiates runtime client using specific connection.
166169
func NewClientWithConnection(conn *grpc.ClientConn) Client {
167170
return &GRPCClient{
168-
connection: conn,
169-
protoClient: runtimev1pb.NewRuntimeClient(conn),
171+
ObjectStorageServiceClient: s3.NewObjectStorageServiceClient(conn),
172+
connection: conn,
173+
protoClient: runtimev1pb.NewRuntimeClient(conn),
170174
}
171175
}
172176

173177
// GRPCClient is the gRPC implementation of runtime client.
174178
type GRPCClient struct {
179+
s3.ObjectStorageServiceClient
175180
connection *grpc.ClientConn
176181
protoClient runtimev1pb.RuntimeClient
177182
}

0 commit comments

Comments
 (0)