util.go 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * EliasDB
  3. *
  4. * Copyright 2016 Matthias Ladkau. All rights reserved.
  5. *
  6. * This Source Code Form is subject to the terms of the Mozilla Public
  7. * License, v. 2.0. If a copy of the MPL was not distributed with this
  8. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  9. */
  10. package dbfunc
  11. import (
  12. "devt.de/krotik/ecal/parser"
  13. "devt.de/krotik/eliasdb/graph"
  14. )
  15. /*
  16. RaiseGraphEventHandledFunc returns the special graph.ErrEventHandled error which a sink,
  17. handling graph events, can return to notify the GraphManager that no further
  18. action is necessary.
  19. */
  20. type RaiseGraphEventHandledFunc struct {
  21. }
  22. /*
  23. Run executes the ECAL function.
  24. */
  25. func (f *RaiseGraphEventHandledFunc) Run(instanceID string, vs parser.Scope, is map[string]interface{}, tid uint64, args []interface{}) (interface{}, error) {
  26. return nil, graph.ErrEventHandled
  27. }
  28. /*
  29. DocString returns a descriptive string.
  30. */
  31. func (f *RaiseGraphEventHandledFunc) DocString() (string, error) {
  32. return "When handling a graph event, notify the GraphManager of EliasDB that no further action is necessary.", nil
  33. }