parent
3334b84d40
commit
f9313ec08f
@ -50,7 +50,7 @@ type Invoker interface {
|
|||||||
//
|
//
|
||||||
// (Internal endpoint) Fail an operation and write a StatusMessage.
|
// (Internal endpoint) Fail an operation and write a StatusMessage.
|
||||||
//
|
//
|
||||||
// POST /operations/{OperationID}/failed
|
// POST /operations/{OperationID}/status/operation-failed
|
||||||
ActionOperationFailed(ctx context.Context, params ActionOperationFailedParams) error
|
ActionOperationFailed(ctx context.Context, params ActionOperationFailedParams) error
|
||||||
// ActionSubmissionAccepted invokes actionSubmissionAccepted operation.
|
// ActionSubmissionAccepted invokes actionSubmissionAccepted operation.
|
||||||
//
|
//
|
||||||
@ -468,7 +468,7 @@ func (c *Client) sendActionMapfixValidated(ctx context.Context, params ActionMap
|
|||||||
//
|
//
|
||||||
// (Internal endpoint) Fail an operation and write a StatusMessage.
|
// (Internal endpoint) Fail an operation and write a StatusMessage.
|
||||||
//
|
//
|
||||||
// POST /operations/{OperationID}/failed
|
// POST /operations/{OperationID}/status/operation-failed
|
||||||
func (c *Client) ActionOperationFailed(ctx context.Context, params ActionOperationFailedParams) error {
|
func (c *Client) ActionOperationFailed(ctx context.Context, params ActionOperationFailedParams) error {
|
||||||
_, err := c.sendActionOperationFailed(ctx, params)
|
_, err := c.sendActionOperationFailed(ctx, params)
|
||||||
return err
|
return err
|
||||||
@ -478,7 +478,7 @@ func (c *Client) sendActionOperationFailed(ctx context.Context, params ActionOpe
|
|||||||
otelAttrs := []attribute.KeyValue{
|
otelAttrs := []attribute.KeyValue{
|
||||||
otelogen.OperationID("actionOperationFailed"),
|
otelogen.OperationID("actionOperationFailed"),
|
||||||
semconv.HTTPRequestMethodKey.String("POST"),
|
semconv.HTTPRequestMethodKey.String("POST"),
|
||||||
semconv.HTTPRouteKey.String("/operations/{OperationID}/failed"),
|
semconv.HTTPRouteKey.String("/operations/{OperationID}/status/operation-failed"),
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run stopwatch.
|
// Run stopwatch.
|
||||||
@ -530,7 +530,7 @@ func (c *Client) sendActionOperationFailed(ctx context.Context, params ActionOpe
|
|||||||
}
|
}
|
||||||
pathParts[1] = encoded
|
pathParts[1] = encoded
|
||||||
}
|
}
|
||||||
pathParts[2] = "/failed"
|
pathParts[2] = "/status/operation-failed"
|
||||||
uri.AddPathParts(u, pathParts[:]...)
|
uri.AddPathParts(u, pathParts[:]...)
|
||||||
|
|
||||||
stage = "EncodeQueryParams"
|
stage = "EncodeQueryParams"
|
||||||
|
@ -485,14 +485,14 @@ func (s *Server) handleActionMapfixValidatedRequest(args [1]string, argsEscaped
|
|||||||
//
|
//
|
||||||
// (Internal endpoint) Fail an operation and write a StatusMessage.
|
// (Internal endpoint) Fail an operation and write a StatusMessage.
|
||||||
//
|
//
|
||||||
// POST /operations/{OperationID}/failed
|
// POST /operations/{OperationID}/status/operation-failed
|
||||||
func (s *Server) handleActionOperationFailedRequest(args [1]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) {
|
func (s *Server) handleActionOperationFailedRequest(args [1]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) {
|
||||||
statusWriter := &codeRecorder{ResponseWriter: w}
|
statusWriter := &codeRecorder{ResponseWriter: w}
|
||||||
w = statusWriter
|
w = statusWriter
|
||||||
otelAttrs := []attribute.KeyValue{
|
otelAttrs := []attribute.KeyValue{
|
||||||
otelogen.OperationID("actionOperationFailed"),
|
otelogen.OperationID("actionOperationFailed"),
|
||||||
semconv.HTTPRequestMethodKey.String("POST"),
|
semconv.HTTPRequestMethodKey.String("POST"),
|
||||||
semconv.HTTPRouteKey.String("/operations/{OperationID}/failed"),
|
semconv.HTTPRouteKey.String("/operations/{OperationID}/status/operation-failed"),
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start a span for this request.
|
// Start a span for this request.
|
||||||
|
@ -242,9 +242,9 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
switch elem[0] {
|
switch elem[0] {
|
||||||
case '/': // Prefix: "/failed"
|
case '/': // Prefix: "/status/operation-failed"
|
||||||
|
|
||||||
if l := len("/failed"); len(elem) >= l && elem[0:l] == "/failed" {
|
if l := len("/status/operation-failed"); len(elem) >= l && elem[0:l] == "/status/operation-failed" {
|
||||||
elem = elem[l:]
|
elem = elem[l:]
|
||||||
} else {
|
} else {
|
||||||
break
|
break
|
||||||
@ -817,9 +817,9 @@ func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool) {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
switch elem[0] {
|
switch elem[0] {
|
||||||
case '/': // Prefix: "/failed"
|
case '/': // Prefix: "/status/operation-failed"
|
||||||
|
|
||||||
if l := len("/failed"); len(elem) >= l && elem[0:l] == "/failed" {
|
if l := len("/status/operation-failed"); len(elem) >= l && elem[0:l] == "/status/operation-failed" {
|
||||||
elem = elem[l:]
|
elem = elem[l:]
|
||||||
} else {
|
} else {
|
||||||
break
|
break
|
||||||
@ -832,7 +832,7 @@ func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool) {
|
|||||||
r.name = ActionOperationFailedOperation
|
r.name = ActionOperationFailedOperation
|
||||||
r.summary = "(Internal endpoint) Fail an operation and write a StatusMessage"
|
r.summary = "(Internal endpoint) Fail an operation and write a StatusMessage"
|
||||||
r.operationID = "actionOperationFailed"
|
r.operationID = "actionOperationFailed"
|
||||||
r.pathPattern = "/operations/{OperationID}/failed"
|
r.pathPattern = "/operations/{OperationID}/status/operation-failed"
|
||||||
r.args = args
|
r.args = args
|
||||||
r.count = 1
|
r.count = 1
|
||||||
return r, true
|
return r, true
|
||||||
|
@ -30,7 +30,7 @@ type Handler interface {
|
|||||||
//
|
//
|
||||||
// (Internal endpoint) Fail an operation and write a StatusMessage.
|
// (Internal endpoint) Fail an operation and write a StatusMessage.
|
||||||
//
|
//
|
||||||
// POST /operations/{OperationID}/failed
|
// POST /operations/{OperationID}/status/operation-failed
|
||||||
ActionOperationFailed(ctx context.Context, params ActionOperationFailedParams) error
|
ActionOperationFailed(ctx context.Context, params ActionOperationFailedParams) error
|
||||||
// ActionSubmissionAccepted implements actionSubmissionAccepted operation.
|
// ActionSubmissionAccepted implements actionSubmissionAccepted operation.
|
||||||
//
|
//
|
||||||
|
@ -44,7 +44,7 @@ func (UnimplementedHandler) ActionMapfixValidated(ctx context.Context, params Ac
|
|||||||
//
|
//
|
||||||
// (Internal endpoint) Fail an operation and write a StatusMessage.
|
// (Internal endpoint) Fail an operation and write a StatusMessage.
|
||||||
//
|
//
|
||||||
// POST /operations/{OperationID}/failed
|
// POST /operations/{OperationID}/status/operation-failed
|
||||||
func (UnimplementedHandler) ActionOperationFailed(ctx context.Context, params ActionOperationFailedParams) error {
|
func (UnimplementedHandler) ActionOperationFailed(ctx context.Context, params ActionOperationFailedParams) error {
|
||||||
return ht.ErrNotImplemented
|
return ht.ErrNotImplemented
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user