server

package
v0.97.7 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is server providers.

View Source
var Version = "dev"

Functions

func NewGRPCServer

func NewGRPCServer(opts *Opts) (*grpc.Server, error)

NewGRPCServer new a gRPC server.

func NewHTTPServer

func NewHTTPServer(opts *Opts, grpcSrv *grpc.Server) (*http.Server, error)

NewHTTPServer new an HTTP server.

Types

type HTTPMetricsServer

type HTTPMetricsServer struct {
	*http.Server
}

HTTPMetricsServer is a HTTP server that exposes the metrics endpoint

func NewHTTPMetricsServer

func NewHTTPMetricsServer(opts *Opts) (*HTTPMetricsServer, error)

NewHTTPMetricsServer exposes the metrics endpoint in another port

type Opts

type Opts struct {
	// UseCases
	UserUseCase         *biz.UserUseCase
	RobotAccountUseCase *biz.RobotAccountUseCase
	CASBackendUseCase   *biz.CASBackendUseCase
	CASClientUseCase    *biz.CASClientUseCase
	IntegrationUseCase  *biz.IntegrationUseCase
	ReferrerUseCase     *biz.ReferrerUseCase
	APITokenUseCase     *biz.APITokenUseCase
	OrganizationUseCase *biz.OrganizationUseCase
	WorkflowUseCase     *biz.WorkflowUseCase
	// Services
	WorkflowSvc         *service.WorkflowService
	AuthSvc             *service.AuthService
	RobotAccountSvc     *service.RobotAccountService
	WorkflowRunSvc      *service.WorkflowRunService
	AttestationSvc      *service.AttestationService
	WorkflowContractSvc *service.WorkflowContractService
	ContextSvc          *service.ContextService
	CASCredsSvc         *service.CASCredentialsService
	OrgMetricsSvc       *service.OrgMetricsService
	IntegrationsSvc     *service.IntegrationsService
	OrganizationSvc     *service.OrganizationService
	CASBackendSvc       *service.CASBackendService
	CASRedirectSvc      *service.CASRedirectService
	OrgInvitationSvc    *service.OrgInvitationService
	ReferrerSvc         *service.ReferrerService
	APITokenSvc         *service.APITokenService
	AttestationStateSvc *service.AttestationStateService
	UserSvc             *service.UserService
	SigningSvc          *service.SigningService
	PrometheusSvc       *service.PrometheusService
	// Utils
	Logger       log.Logger
	ServerConfig *conf.Server
	AuthConfig   *conf.Auth
	Credentials  credentials.ReaderWriter
	Enforcer     *authz.Enforcer
	Validator    *protovalidate.Validator
}

Jump to

Keyboard shortcuts

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