Skip to content

Commit

Permalink
A basic shared model for events
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaslin committed Aug 11, 2014
1 parent 7c87a53 commit b676f90
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 0 deletions.
5 changes: 5 additions & 0 deletions echo-model/echo-model.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apply from: "$rootDir/gradle/groovy-module.gradle"

dependencies{
compile commonDependencies.kork
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.netflix.spinnaker.echo.events

import com.netflix.spinnaker.echo.model.Event

/**
*
*/
interface EchoEventListener {

void processEvent(Event event)

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.netflix.spinnaker.echo.model

/**
* Represents an event
*/
class Event {
Metadata details
Map content
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.netflix.spinnaker.echo.model

/**
* Represents event metadata
*/
class Metadata {
String source
String type
String created = new Date().time
}

0 comments on commit b676f90

Please sign in to comment.