Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config encapsulates the requirements for generating a Stream
type LocalConfig ¶
type LocalConfig struct { RootPath string Fsys fsys.Filesystem }
LocalConfig creates a configuration to create a LocalLog.
func BuildLocalConfig ¶
func BuildLocalConfig(opts ...LocalConfigOption) (*LocalConfig, error)
BuildLocalConfig ingests configuration options to then yield a LocalConfig, and return an error if it fails during configuring.
type LocalConfigOption ¶
type LocalConfigOption func(*LocalConfig) error
LocalConfigOption defines a option for generating a LocalConfig
func WithFsys ¶
func WithFsys(fsys fsys.Filesystem) LocalConfigOption
WithFsys adds an fsys option to the configuration
func WithRootPath ¶
func WithRootPath(rootPath string) LocalConfigOption
WithRootPath adds an rootPath option to the configuration
type Log ¶
type Log interface { // Append a transaction to the log Append(models.Transaction) error }
Log represents an audit log of transactions that have occurred.
type Option ¶
Option defines a option for generating a stream Config
func WithLocalConfig ¶
func WithLocalConfig(localConfig *LocalConfig) Option
WithLocalConfig adds a local log config to the configuration
func WithRemoteConfig ¶
func WithRemoteConfig(remoteConfig *RemoteConfig) Option
WithRemoteConfig adds a remote log config to the configuration
type RemoteConfig ¶
RemoteConfig creates a configuration to create a RemoteLog.
func BuildRemoteConfig ¶
func BuildRemoteConfig(opts ...RemoteConfigOption) (*RemoteConfig, error)
BuildRemoteConfig ingests configuration options to then yield a RemoteConfig, and return an error if it fails during configuring.
type RemoteConfigOption ¶
type RemoteConfigOption func(*RemoteConfig) error
RemoteConfigOption defines a option for generating a RemoteConfig
func WithEC2Role ¶
func WithEC2Role(ec2Role bool) RemoteConfigOption
WithEC2Role adds an EC2Role option to the configuration
func WithID ¶
func WithID(id string) RemoteConfigOption
WithID adds an ID option to the configuration
func WithRegion ¶
func WithRegion(region string) RemoteConfigOption
WithRegion adds an Region option to the configuration
func WithSecret ¶
func WithSecret(secret string) RemoteConfigOption
WithSecret adds an Secret option to the configuration
func WithStream ¶
func WithStream(stream string) RemoteConfigOption
WithStream adds an Stream option to the configuration
func WithToken ¶
func WithToken(token string) RemoteConfigOption
WithToken adds an Token option to the configuration