Browse Source

feat: Remove old definitions

Matthias Ladkau 3 years ago
parent
commit
a2431ae058
5 changed files with 0 additions and 164 deletions
  1. 0 30
      defs/brawler/eventsource.go
  2. 0 40
      defs/rumble/func.go
  3. 0 45
      defs/rumble/globals.go
  4. 0 22
      defs/rumble/runtime.go
  5. 0 27
      defs/rumble/variables.go

+ 0 - 30
defs/brawler/eventsource.go

@@ -1,30 +0,0 @@
-/*
- * Brawler
- *
- * Copyright 2019 Matthias Ladkau. All rights reserved.
- *
- * This Source Code Form is subject to the terms of the MIT
- * License, If a copy of the MIT License was not distributed with this
- * file, You can obtain one at https://opensource.org/licenses/MIT.
- */
-
-package brawler
-
-/*
-EventPublisher is the API for external event sources to publish events
-to Brawler engines. The event source should use a given EventPublisher
-object to inject events. Use api.RegisterEventSource to create a new
-EventPublisher object.
-*/
-type EventPublisher interface {
-
-	/*
-		AddEvent adds a new event to one or more Brawler engines.
-		Expects 3 parameters: Name - a name which identifies the event,
-		Kind - an event kind which is checked against the kind match of
-		sinks and State - an event state which contains additional data.
-		All of the given parameter will be accessible from Rumble if
-		the event triggers a Rumble sink.
-	*/
-	AddEvent(name string, kind []string, state map[interface{}]interface{}) error
-}

+ 0 - 40
defs/rumble/func.go

@@ -1,40 +0,0 @@
-/*
- * Brawler
- *
- * Copyright 2019 Matthias Ladkau. All rights reserved.
- *
- * This Source Code Form is subject to the terms of the MIT
- * License, If a copy of the MIT License was not distributed with this
- * file, You can obtain one at https://opensource.org/licenses/MIT.
- */
-
-/*
-Package rumble contains all definitions which external code should use to
-integrate with Brawler.
-*/
-package rumble
-
-/*
-Function is a function in Rumble.
-*/
-type Function interface {
-
-	/*
-		Name returns the name of the function. A function should be camelCase
-		and should only contain alphanumerical characters.
-	*/
-	Name() string
-
-	/*
-		Validate is called to validate the number of arguments, check the
-		environment and to execute any initialisation code which might be
-		necessary for the function.
-	*/
-	Validate(argsNum int, runtime Runtime) RuntimeError
-
-	/*
-		Execute executes the rumble function. This function might be called
-		by several threads concurrently.
-	*/
-	Execute(argsVal []interface{}, vars Variables, runtime Runtime) (interface{}, RuntimeError)
-}

+ 0 - 45
defs/rumble/globals.go

@@ -1,45 +0,0 @@
-/*
- * Brawler
- *
- * Copyright 2019 Matthias Ladkau. All rights reserved.
- *
- * This Source Code Form is subject to the terms of the MIT
- * License, If a copy of the MIT License was not distributed with this
- * file, You can obtain one at https://opensource.org/licenses/MIT.
- */
-
-package rumble
-
-import (
-	"errors"
-)
-
-/*
-Default variables for sinks
-*/
-const (
-	VarProcessor = "processor" // Current event processor (new sinks will be added to this)
-	VarMonitor   = "monitor"   // Current event monitor (new events will be using this)
-	VarEvent     = "event"     // Current event which triggered a sink
-)
-
-/*
-Runtime related error types - these errors are generic errors of Rumble
-where the code will not check for object equality
-*/
-var (
-	ErrInvalidConstruct = errors.New("Invalid construct")
-	ErrInvalidState     = errors.New("Invalid state")
-	ErrVarAccess        = errors.New("Cannot access variable")
-	ErrNotANumber       = errors.New("Operand is not a number")
-	ErrNotABoolean      = errors.New("Operand is not a boolean")
-	ErrNotAList         = errors.New("Operand is not a list")
-	ErrNotAMap          = errors.New("Operand is not a map")
-	ErrNotAListOrMap    = errors.New("Operand is not a list nor a map")
-)
-
-/*
-RuntimeError is a special error which contains additional internal
-information which are not exposed (e.g. code line).
-*/
-type RuntimeError error

+ 0 - 22
defs/rumble/runtime.go

@@ -1,22 +0,0 @@
-/*
- * Brawler
- *
- * Copyright 2019 Matthias Ladkau. All rights reserved.
- *
- * This Source Code Form is subject to the terms of the MIT
- * License, If a copy of the MIT License was not distributed with this
- * file, You can obtain one at https://opensource.org/licenses/MIT.
- */
-
-package rumble
-
-/*
-Runtime accesses the runtime environment of the function.
-*/
-type Runtime interface {
-
-	/*
-	   NewRuntimeError creates a new runtime error.
-	*/
-	NewRuntimeError(t error, d string) RuntimeError
-}

+ 0 - 27
defs/rumble/variables.go

@@ -1,27 +0,0 @@
-/*
- * Brawler
- *
- * Copyright 2019 Matthias Ladkau. All rights reserved.
- *
- * This Source Code Form is subject to the terms of the MIT
- * License, If a copy of the MIT License was not distributed with this
- * file, You can obtain one at https://opensource.org/licenses/MIT.
- */
-
-package rumble
-
-/*
-Variables accesses the variable scope of the function.
-*/
-type Variables interface {
-
-	/*
-	   SetValue sets a new value for a variable.
-	*/
-	SetValue(varName string, varValue interface{}) error
-
-	/*
-	   GetValue gets the current value of a variable.
-	*/
-	GetValue(varName string) (interface{}, bool, error)
-}