Skip to content

Commit

Permalink
mockgcp: Add comments on OperationsHandler
Browse files Browse the repository at this point in the history
This should help implementors choose the right prefix value.
  • Loading branch information
justinsb committed Feb 28, 2024
1 parent 17f273f commit 76adc4d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mockgcp/common/operations/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ import (
"k8s.io/klog/v2"
)

// RegisterOperationsPath will serve the operations REST API at `path`.
// This is currently a GET handler; `path` should include a parameter {name}
// which is the operation's name, and an optional parameter {prefix} which
// includes whatever else the service defines as the per-operation prefix.
// The value of path / prefix should match whatever the API defines as its
// operations endpoint, which is often most conveniently determined by looking
// at the API documentation, or by seeing what paths clients request.
func (s *Operations) RegisterOperationsPath(path string) func(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return func(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
forwardResponseOptions := mux.GetForwardResponseOptions()
Expand Down

0 comments on commit 76adc4d

Please sign in to comment.