diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2025-07-06 13:57:02 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-06 13:57:02 -0700 |
| commit | aa668523047c273dc4065dc0f40852efcdf9e9f0 (patch) | |
| tree | 87f7f145d699cf1824c8251ae71435462bfd3318 /weed/pb/grpc_client_server.go | |
| parent | 302e62d4805c60f3fdb6620b01e85859d68078ed (diff) | |
| download | seaweedfs-aa668523047c273dc4065dc0f40852efcdf9e9f0.tar.xz seaweedfs-aa668523047c273dc4065dc0f40852efcdf9e9f0.zip | |
Admin UI add maintenance menu (#6944)
* add ui for maintenance
* valid config loading. fix workers page.
* refactor
* grpc between admin and workers
* add a long-running bidirectional grpc call between admin and worker
* use the grpc call to heartbeat
* use the grpc call to communicate
* worker can remove the http client
* admin uses http port + 10000 as its default grpc port
* one task one package
* handles connection failures gracefully with exponential backoff
* grpc with insecure tls
* grpc with optional tls
* fix detecting tls
* change time config from nano seconds to seconds
* add tasks with 3 interfaces
* compiles reducing hard coded
* remove a couple of tasks
* remove hard coded references
* reduce hard coded values
* remove hard coded values
* remove hard coded from templ
* refactor maintenance package
* fix import cycle
* simplify
* simplify
* auto register
* auto register factory
* auto register task types
* self register types
* refactor
* simplify
* remove one task
* register ui
* lazy init executor factories
* use registered task types
* DefaultWorkerConfig remove hard coded task types
* remove more hard coded
* implement get maintenance task
* dynamic task configuration
* "System Settings" should only have system level settings
* adjust menu for tasks
* ensure menu not collapsed
* render job configuration well
* use templ for ui of task configuration
* fix ordering
* fix bugs
* saving duration in seconds
* use value and unit for duration
* Delete WORKER_REFACTORING_PLAN.md
* Delete maintenance.json
* Delete custom_worker_example.go
* remove address from workers
* remove old code from ec task
* remove creating collection button
* reconnect with exponential backoff
* worker use security.toml
* start admin server with tls info from security.toml
* fix "weed admin" cli description
Diffstat (limited to 'weed/pb/grpc_client_server.go')
| -rw-r--r-- | weed/pb/grpc_client_server.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/weed/pb/grpc_client_server.go b/weed/pb/grpc_client_server.go index d88c0ce3d..3bca1d07e 100644 --- a/weed/pb/grpc_client_server.go +++ b/weed/pb/grpc_client_server.go @@ -24,6 +24,7 @@ import ( "github.com/seaweedfs/seaweedfs/weed/pb/filer_pb" "github.com/seaweedfs/seaweedfs/weed/pb/master_pb" "github.com/seaweedfs/seaweedfs/weed/pb/mq_pb" + "github.com/seaweedfs/seaweedfs/weed/pb/worker_pb" ) const ( @@ -312,3 +313,10 @@ func WithOneOfGrpcFilerClients(streamingMode bool, filerAddresses []ServerAddres return err } + +func WithWorkerClient(streamingMode bool, workerAddress string, grpcDialOption grpc.DialOption, fn func(client worker_pb.WorkerServiceClient) error) error { + return WithGrpcClient(streamingMode, 0, func(grpcConnection *grpc.ClientConn) error { + client := worker_pb.NewWorkerServiceClient(grpcConnection) + return fn(client) + }, workerAddress, false, grpcDialOption) +} |
