In Go, every directory is a distinct package. There is no such thing as
a subpackage. Having `api` is a separate package as a subdirectory in
each plugin ensures that we will not run into cyclic dependency issues.
Signed-off-by: Prashanth Pai <ppai@redhat.com>
implement handler function to send
events to registered webhook
registered handle function will get
called when the events happen.
check origin UUID, if it is same as the peer ID
send events to the registered webhook
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
Implemented wehook/test rest API in glusterd2
which will be called by clients to test webhook
connections between all peers in glusterd2
and webhook URL
added rest client code to call webhook/test API
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
expect only URL which is required to delete webhook
earlier we use to pass same request body for both
webhook create and webhook delete,we store URL in
ETCD to add webhook, so to delete webhook we
require only URL, made code changes to accept
URL in request body for webhook delete
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
None of the plugins exposed sunrpc programs using plugin interface.
Removing unused part from the Plugin interface.
Signed-off-by: Aravinda VK <avishwan@redhat.com>
- Increased the TTL to 10 minutes and made configurable.
- Exposed the new API to view Events
- Added Geo-replication Events
- `GET /v1/events` now returns list of events in sorted order
Updates: #418
Signed-off-by: Aravinda VK <avishwan@redhat.com>
* Remove having to specify default error code. It is made implicit
instead. This removes some of the code clutter.
* Support returning multiple errors in a single API response.
Although this will be rarely used, introducing the provision in API
right now is better than later.
* Allow callers to pass both string and error types.
* Introduce a error code map which maps error codes (integers) to their
brief textual description.
Signed-off-by: Prashanth Pai <ppai@redhat.com>
This is an as-is import of sunrpc codec without introducing any
functional code changes. There are few opportunities for cleanup and
optimizations and that'll be done in future.
Signed-off-by: Prashanth Pai <ppai@redhat.com>