dataaccess

package
v1.42.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package dataaccess wires the Lookup and Update gRPC services into a single process listening on one port.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	GRPCAddress string `mapstructure:"grpc_address"`

	// MetricsAddress defaults to ":9090" when unset (see MetricsAddr).
	MetricsAddress string `mapstructure:"metrics_address"`

	ServiceAuth serviceauth.Config `mapstructure:",squash"`

	UserAuth userauth.Config `mapstructure:"auth"`
}

func (Config) GRPCAddr

func (c Config) GRPCAddr() string

func (Config) MetricsAddr added in v1.36.0

func (c Config) MetricsAddr() string

func (Config) Validate

func (c Config) Validate() error

type DataAccess

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

func NewDataAccessAPI

func NewDataAccessAPI(ctx context.Context, cfg config.RuntimeConfig[Config]) (*DataAccess, error)

func (*DataAccess) Address

func (d *DataAccess) Address() string

func (*DataAccess) Logger

func (d *DataAccess) Logger() *logrus.Entry

func (*DataAccess) Metrics added in v1.36.0

func (d *DataAccess) Metrics() *metrics.Metrics

Metrics returns the registry constructed during boot, so the metrics HTTP server (built separately — see service.dataAccessFactories) can serve the same registry this gRPC server and its DB layer record into. That server owns Shutdown.

func (*DataAccess) Name

func (d *DataAccess) Name() string

func (*DataAccess) Serve

func (d *DataAccess) Serve() error

func (*DataAccess) Shutdown

func (d *DataAccess) Shutdown(ctx context.Context) error

Directories

Path Synopsis
internal
dbmetrics
Package dbmetrics defines the data-access-wide repository-operation- duration instrument (used by store.go/resolver.go): a metric name plus a thin re-export of pkg/telemetry/db's generic OperationRecorder.
Package dbmetrics defines the data-access-wide repository-operation- duration instrument (used by store.go/resolver.go): a metric name plus a thin re-export of pkg/telemetry/db's generic OperationRecorder.
relationships/roles
Package roles parses the glaz role definitions vendored under vendored/ (synced by vendir), the single source of truth for role ids so they are not hardcoded here.
Package roles parses the glaz role definitions vendored under vendored/ (synced by vendir), the single source of truth for role ids so they are not hardcoded here.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL