Documentation ¶
Index ¶
Constants ¶
View Source
const (
Backend = "hub"
)
Variables ¶
View Source
var ( SyncStatusPrefix = []byte("bs") // "b" for contiguity with audit log keys in LSM, "s" because "sync" AccessSyncPrefix = []byte("bsac") // these need to be len(4) to correctly reuse `local.GenKey` DecisionSyncPrefix = []byte("bsde") )
Functions ¶
This section is empty.
Types ¶
type Conf ¶
type Conf struct { Ingest IngestConf `yaml:"ingest" conf:",ignore"` local.Conf `yaml:",inline"` }
func (*Conf) SetDefaults ¶
func (c *Conf) SetDefaults()
type ErrIngestBackoff ¶
func (ErrIngestBackoff) Error ¶
func (e ErrIngestBackoff) Error() string
type IngestConf ¶
type IngestConf struct { // Credentials holds bundle source credentials. Credentials *hub.CredentialsConf `yaml:"credentials" conf:",ignore"` // Connection defines settings for the remote server connection. Connection *hub.ConnectionConf `yaml:"connection" conf:",ignore"` // MaxBatchSize defines the max number of log entries to send in each Ingest request. MaxBatchSize uint `yaml:"maxBatchSize" conf:",example=32"` // MinFlushInterval is the minimal duration between Ingest requests. MinFlushInterval time.Duration `yaml:"minFlushInterval" conf:",example=3s"` // FlushTimeout defines the max allowable timeout for each Ingest request. FlushTimeout time.Duration `yaml:"flushTimeout" conf:",example=5s"` // NumGoRoutines defines the max number of goroutines used when streaming log entries from the local DB. NumGoRoutines uint `yaml:"numGoRoutines" conf:",example=8"` }
type IngestSyncer ¶
type IngestSyncer interface {
Sync(context.Context, *logsv1.IngestBatch) error
}
type Log ¶
func NewLog ¶
func NewLog(conf *Conf, decisionFilter audit.DecisionLogEntryFilter, syncer IngestSyncer, logger *zap.Logger) (*Log, error)
func (*Log) WriteAccessLogEntry ¶
func (*Log) WriteDecisionLogEntry ¶
Click to show internal directories.
Click to hide internal directories.