-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Remove pipeline abstraction (#144)
* refactor: Remove pipeline abstraction * Remove unnecessary code * Move exception to core * Formatting * Cleanup code * Update version * Bump major version
- Loading branch information
Showing
13 changed files
with
286 additions
and
379 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright 2020 Cognite AS | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
namespace Oryx | ||
|
||
open System.Threading.Tasks | ||
|
||
type IHttpNext<'TSource> = | ||
abstract member OnSuccessAsync: ctx: HttpContext * content: 'TSource -> Task<unit> | ||
abstract member OnErrorAsync: ctx: HttpContext * error: exn -> Task<unit> | ||
abstract member OnCancelAsync: ctx: HttpContext -> Task<unit> | ||
|
||
type HttpHandler<'TResult> = IHttpNext<'TResult> -> Task<unit> | ||
|
||
exception HttpException of (HttpContext * exn) with | ||
override this.ToString() = | ||
match this :> exn with | ||
| HttpException(_, err) -> err.ToString() | ||
| _ -> failwith "This should not never happen." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.