Skip to main content

store

import "redn3t.com/odirscan/internal/store"

Index

Variables

var ErrRoutingNotFound = errors.New("routing entry not found")

func MigrateUp

func MigrateUp(dsn string) error

func NewPostgresPool

func NewPostgresPool(ctx context.Context, dsn string) (*pgxpool.Pool, error)

type RoutingEntry

type RoutingEntry struct {
OrchestratorID string
UserID string
}

type RoutingTable

type RoutingTable struct {
// contains filtered or unexported fields
}

func NewRoutingTable

func NewRoutingTable(addr string) *RoutingTable

func (*RoutingTable) Close

func (rt *RoutingTable) Close() error

func (*RoutingTable) Lookup

func (rt *RoutingTable) Lookup(ctx context.Context, scanID string) (RoutingEntry, error)

func (*RoutingTable) LookupAnalysis

func (rt *RoutingTable) LookupAnalysis(ctx context.Context, analysisID string) (RoutingEntry, error)

func (*RoutingTable) Refresh

func (rt *RoutingTable) Refresh(ctx context.Context, scanID string, ttl time.Duration) error

func (*RoutingTable) RefreshAnalysis

func (rt *RoutingTable) RefreshAnalysis(ctx context.Context, analysisID string, ttl time.Duration) error

func (*RoutingTable) Remove

func (rt *RoutingTable) Remove(ctx context.Context, scanID string) error

func (*RoutingTable) RemoveAnalysis

func (rt *RoutingTable) RemoveAnalysis(ctx context.Context, analysisID string) error

func (*RoutingTable) Write

func (rt *RoutingTable) Write(ctx context.Context, scanID, orchestratorID, userID string, ttl time.Duration) error

func (*RoutingTable) WriteAnalysis

func (rt *RoutingTable) WriteAnalysis(ctx context.Context, analysisID, orchestratorID, userID string, ttl time.Duration) error

Generated by gomarkdoc