mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
HTTP Triggers hookup (#1086)
* Initial suypport for invoking tiggers * dupe method * tighten server constraints * runner tests not working yet * basic route tests passing * post rebase fixes * add hybrid support for trigger invoke and tests * consoloidate all hybrid evil into one place * cleanup and make triggers unique by source * fix oops with Agent * linting * review fixes
This commit is contained in:
@@ -13,6 +13,18 @@ import (
|
||||
// nopDataStore implements agent.DataAccess
|
||||
type nopDataStore struct{}
|
||||
|
||||
func (cl *nopDataStore) GetTriggerBySource(ctx context.Context, appId string, triggerType, source string) (*models.Trigger, error) {
|
||||
ctx, span := trace.StartSpan(ctx, "nop_datastore_get_trigger_by_source")
|
||||
defer span.End()
|
||||
return nil, errors.New("should not call GetTriggerBySource on a NOP data store")
|
||||
}
|
||||
|
||||
func (cl *nopDataStore) GetFnByID(ctx context.Context, fnId string) (*models.Fn, error) {
|
||||
ctx, span := trace.StartSpan(ctx, "nop_datastore_get_fn_by_id")
|
||||
defer span.End()
|
||||
return nil, errors.New("should not call GetFnByID on a NOP data store")
|
||||
}
|
||||
|
||||
func NewNopDataStore() (agent.DataAccess, error) {
|
||||
return &nopDataStore{}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user