Skip to content

Commit 854fe77

Browse files
authored
feat: add SideEffect type placeholder for scalasdk (#426)
1 parent e24766b commit 854fe77

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*
2+
* Copyright 2021 Lightbend Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.akkaserverless.scalasdk
18+
19+
/* A side effect. */
20+
object SideEffect {
21+
22+
/**
23+
* Create a side effect of the given service call.
24+
*
25+
* @param serviceCall
26+
* The service call to effect.
27+
* @param synchronous
28+
* Whether this effect should be executed synchronously.
29+
* @return
30+
* The side effect.
31+
*/
32+
def apply(serviceCall: ServiceCall, synchronous: Boolean): SideEffect = ???
33+
34+
/**
35+
* Create a side effect of the given service call.
36+
*
37+
* @param serviceCall
38+
* The service call to effect.
39+
* @return
40+
* The side effect.
41+
*/
42+
def apply(serviceCall: ServiceCall): SideEffect = ???
43+
}
44+
trait SideEffect {
45+
46+
/** The service call that is executed as this effect. */
47+
def serviceCall: ServiceCall
48+
49+
/** Whether this effect should be executed synchronously or not. */
50+
def synchronous: Boolean
51+
}

0 commit comments

Comments
 (0)