You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, it is known that cost calcualation is made through haaukins-store, which means that before accepting request from client there should be pre-check mechanism where webclient can either make a gRPC request to haaukins-store or haaukins itself to retrieve information about the cost in given time interval based on response, webclient should be able to proceed createEvent gRPC call. Example approach could be like
var (
NotRecommendedWarning=errors.New("Have limited resources in chosen given range, might have problems, do you still wish to continue ?")
RiskWarning=errors.New("Event can be started however it may effect other events, do you still wish to continue ? ")
)
// return values are string as message, and error to send warning if required funccheckCondition(timeseriesmap[time.Time]int32) (string, error) {
cost:=timeseries[time.Format(timeLayout)]
switch {
casecost<50:
// create event without warningcasecost>90:
// warning message // ask client to confirm the request casecost<=100&&cost>90:
// warning Too risky // ask client to confirm the requestdefault:
// something could be added
}
}
The provided PoC is go pseudo code however it can be done in javascript as well.
The text was updated successfully, but these errors were encountered:
mrtrkmn
changed the title
create a condition based action
create a condition based action & confirm mechanism
Jun 28, 2020
lets the webclient send a request to haaukins to retrieve the cost in given time interval. We should add the rpc message to haaukins first and then develop it here
Now, it is known that cost calcualation is made through haaukins-store, which means that before accepting request from client there should be pre-check mechanism where webclient can either make a gRPC request to haaukins-store or haaukins itself to retrieve information about the cost in given time interval based on response, webclient should be able to proceed
createEvent
gRPC call. Example approach could be likeThe provided PoC is go pseudo code however it can be done in javascript as well.
The text was updated successfully, but these errors were encountered: