core

package
v0.0.0-...-da53dd4 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "dev"

Version set by the build system.

Functions

This section is empty.

Types

type GraphAPITokenClaims

type GraphAPITokenClaims struct {
	OrganizationID   string `json:"organization_id"`
	FederatedGraphID string `json:"federated_graph_id"`
	jwt.RegisteredClaims
}

type MetricsService

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

func NewMetricsService

func NewMetricsService(logger *zap.Logger, chConn clickhouse.Conn) *MetricsService

NewMetricsService creates a new metrics service

func (*MetricsService) Shutdown

func (s *MetricsService) Shutdown(deadline time.Duration)

type Option

type Option func(s *Server)

Option defines the method to customize Server.

func WithJwtSecret

func WithJwtSecret(secret []byte) Option

func WithListenAddr

func WithListenAddr(addr string) Option

func WithLogger

func WithLogger(logger *zap.Logger) Option

type Server

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

func NewServer

func NewServer(metricsService graphqlmetricsv1connect.GraphQLMetricsServiceHandler, opts ...Option) *Server

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

func (*Server) Start

func (s *Server) Start() error

Jump to

Keyboard shortcuts

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