-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5600 from kobergj/EventHistory
Eventhistory Service
- Loading branch information
Showing
40 changed files
with
1,721 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Enhancement: Eventhistory service | ||
|
||
Introduces the `eventhistory` service. It is a service that stores events and provides a grpc API to retrieve them. | ||
|
||
https://github.com/owncloud/ocis/pull/5600 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package store | ||
|
||
import "time" | ||
|
||
// Option provides an option to configure the store | ||
type Option func(*Options) | ||
|
||
// Type defines the type of the store | ||
func Type(typ string) Option { | ||
return func(o *Options) { | ||
o.Type = typ | ||
} | ||
} | ||
|
||
// Addresses defines the addresses where the store can be reached | ||
func Addresses(addrs ...string) Option { | ||
return func(o *Options) { | ||
o.Addresses = addrs | ||
} | ||
} | ||
|
||
// Database defines the Database the store should use | ||
func Database(db string) Option { | ||
return func(o *Options) { | ||
o.Database = db | ||
} | ||
} | ||
|
||
// Table defines the table the store should use | ||
func Table(t string) Option { | ||
return func(o *Options) { | ||
o.Table = t | ||
} | ||
} | ||
|
||
// Size defines the maximum capacity of the store. | ||
// Only applicable when using "ocmem" store | ||
func Size(s int) Option { | ||
return func(o *Options) { | ||
o.Size = s | ||
} | ||
} | ||
|
||
// TTL defines the time to life for elements in the store. | ||
// Only applicable when using "natsjs" store | ||
func TTL(t time.Duration) Option { | ||
return func(o *Options) { | ||
o.TTL = t | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.