server

package
v5.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: AGPL-3.0 Imports: 29 Imported by: 0

Documentation

Overview

Package server is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var FilterMethods = map[string]struct{}{
	"/metrics.Metrics/StreamTopPod":           {},
	"/container.Container/StreamContainerLog": {},
}

FilterMethods 不会记录metadata(错误之类的),但是有一条记录

Functions

func NewApiGateway

func NewApiGateway(endpoint string, app application.App) application.Server

func NewGrpcRunner

func NewGrpcRunner(
	endpoint string,
	app application.App,
) application.Server

func NewMetricsRunner

func NewMetricsRunner(port string, logger mlog.Logger, reg *prometheus.Registry) application.Server

func NewPprofRunner

func NewPprofRunner(logger mlog.Logger) application.Server

Types

type GrpcServerImp

type GrpcServerImp interface {
	GracefulStop()
	Serve(lis net.Listener) error
}

type HttpServer

type HttpServer interface {
	Shutdown(ctx context.Context) error
	ListenAndServe() error
}

type MockGrpcServerImp

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

MockGrpcServerImp is a mock of GrpcServerImp interface.

func NewMockGrpcServerImp

func NewMockGrpcServerImp(ctrl *gomock.Controller) *MockGrpcServerImp

NewMockGrpcServerImp creates a new mock instance.

func (*MockGrpcServerImp) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockGrpcServerImp) GracefulStop

func (m *MockGrpcServerImp) GracefulStop()

GracefulStop mocks base method.

func (*MockGrpcServerImp) Serve

func (m *MockGrpcServerImp) Serve(arg0 net.Listener) error

Serve mocks base method.

type MockGrpcServerImpMockRecorder

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

MockGrpcServerImpMockRecorder is the mock recorder for MockGrpcServerImp.

func (*MockGrpcServerImpMockRecorder) GracefulStop

func (mr *MockGrpcServerImpMockRecorder) GracefulStop() *gomock.Call

GracefulStop indicates an expected call of GracefulStop.

func (*MockGrpcServerImpMockRecorder) Serve

func (mr *MockGrpcServerImpMockRecorder) Serve(arg0 any) *gomock.Call

Serve indicates an expected call of Serve.

type MockHttpServer

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

MockHttpServer is a mock of HttpServer interface.

func NewMockHttpServer

func NewMockHttpServer(ctrl *gomock.Controller) *MockHttpServer

NewMockHttpServer creates a new mock instance.

func (*MockHttpServer) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockHttpServer) ListenAndServe

func (m *MockHttpServer) ListenAndServe() error

ListenAndServe mocks base method.

func (*MockHttpServer) Shutdown

func (m *MockHttpServer) Shutdown(arg0 context.Context) error

Shutdown mocks base method.

type MockHttpServerMockRecorder

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

MockHttpServerMockRecorder is the mock recorder for MockHttpServer.

func (*MockHttpServerMockRecorder) ListenAndServe

func (mr *MockHttpServerMockRecorder) ListenAndServe() *gomock.Call

ListenAndServe indicates an expected call of ListenAndServe.

func (*MockHttpServerMockRecorder) Shutdown

func (mr *MockHttpServerMockRecorder) Shutdown(arg0 any) *gomock.Call

Shutdown indicates an expected call of Shutdown.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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