application

package
v5.0.0-beta.3 Latest Latest
Warning

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

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

Documentation

Overview

Package application is a generated GoMock package.

Index

Constants

This section is empty.

Variables

Functions

func GetPlugin

func GetPlugin[T Plugin](p config.Plugin) (func(app App) (T, error), error)

func GetPlugins

func GetPlugins() map[string]Plugin

GetPlugins get all registered

func RegisterPlugin

func RegisterPlugin(name string, pluginInterface Plugin)

RegisterPlugin register plugin.

Types

type App

type App interface {
	// Data app data.
	Data() data.Data

	// Config app configuration.
	Config() *config.Config

	// IsDebug bool.
	IsDebug() bool

	// GrpcRegistry return register.
	GrpcRegistry() *GrpcRegistry

	// Logger return logger.
	Logger() mlog.Logger

	// Auth return repo.Auth.
	Auth() auth.Auth

	// Oidc return oidc config.
	Oidc() data.OidcConfig

	// PrometheusRegistry return prometheus.
	PrometheusRegistry() *prometheus.Registry

	// Uploader getter
	Uploader() uploader.Uploader

	// Bootstrap boots all.
	Bootstrap() error

	// DB instance.
	DB() *ent.Client

	// AddServer add boot server
	AddServer(Server)

	// Run servers.
	Run() context.Context

	// Shutdown all servers.
	Shutdown()

	// WsHttpServer return ws server.
	WsServer() WsHttpServer

	// Done return done chan.
	Done() <-chan struct{}

	// BeforeServerRunHooks register hooks.
	BeforeServerRunHooks(Callback)

	// RegisterBeforeShutdownFunc register hooks.
	RegisterBeforeShutdownFunc(Callback)

	// RegisterAfterShutdownFunc register hooks.
	RegisterAfterShutdownFunc(Callback)

	// Dispatcher return eventer.
	Dispatcher() event.Dispatcher

	// PluginMgr return plugin manager.
	PluginMgr() PluginManger

	// Singleflight return singleflight.
	Singleflight() *singleflight.Group

	// Cache return cache.
	Cache() cache.Cache

	// Locker return locker
	Locker() locker.Locker

	// CronManager return cron manager
	CronManager() cron.Manager
}

App app.

func NewApp

func NewApp(
	config *config.Config,
	data data.Data,
	logger mlog.Logger,
	uploader uploader.Uploader,
	auth auth.Auth,
	dispatcher event.Dispatcher,
	cronManager mcron.Manager,
	cache cache.Cache,
	cacheLock locker.Locker,
	sf *singleflight.Group,
	pm PluginManger,
	reg *GrpcRegistry,
	ws WsHttpServer,
	pr *prometheus.Registry,
	opts ...Option,
) App

NewApp return App.

type Bootstrapper

type Bootstrapper interface {
	// Bootstrap when app start.
	Bootstrap(App) error
	// Tags boot tags.
	Tags() []string
}

Bootstrapper boots.

type Branch

type Branch interface {
	GetName() string
	IsDefault() bool
	GetWebURL() string
}

type Callback

type Callback func(App)

type Commit

type Commit interface {
	GetID() string
	GetShortID() string
	GetTitle() string
	GetCommittedDate() *time.Time
	GetAuthorName() string
	GetAuthorEmail() string
	GetCommitterName() string
	GetCommitterEmail() string
	GetCreatedAt() *time.Time
	GetMessage() string
	GetProjectID() int64
	GetWebURL() string
}

type DomainManager

type DomainManager interface {
	Plugin

	// GetDomainByIndex domainSuffix: test.com, project: mars, namespace: default index: 0,1,2..., preOccupiedLen: 预占用的长度
	GetDomainByIndex(projectName, namespace string, index, preOccupiedLen int) string

	// GetDomain domainSuffix: test.com, project: mars, namespace: production, preOccupiedLen: 预占用的长度
	GetDomain(projectName, namespace string, preOccupiedLen int) string

	// GetCertSecretName 获取 HTTPS 证书对应的 secret
	GetCertSecretName(projectName string, index int) string

	// GetClusterIssuer CertManager 要用
	GetClusterIssuer() string

	// GetCerts 在 namespace 创建的时候注入证书信息
	GetCerts() (name, key, crt string)
}

type EndpointFunc

type EndpointFunc func(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

type GitServer

type GitServer interface {
	Plugin

	GetProject(pid string) (Project, error)
	ListProjects(page, pageSize int) (ListProjectResponse, error)
	AllProjects() ([]Project, error)

	ListBranches(pid string, page, pageSize int) (ListBranchResponse, error)
	AllBranches(pid string) ([]Branch, error)

	GetCommit(pid string, sha string) (Commit, error)
	GetCommitPipeline(pid string, branch string, sha string) (Pipeline, error)
	ListCommits(pid string, branch string) ([]Commit, error)

	GetFileContentWithBranch(pid string, branch string, filename string) (string, error)
	GetFileContentWithSha(pid string, sha string, filename string) (string, error)

	GetDirectoryFilesWithBranch(pid string, branch string, path string, recursive bool) ([]string, error)
	GetDirectoryFilesWithSha(pid string, sha string, path string, recursive bool) ([]string, error)
}

type GrpcRegistry

type GrpcRegistry struct {
	EndpointFuncs []EndpointFunc
	RegistryFunc  RegistryFunc
}

type ListBranchResponse

type ListBranchResponse interface {
	GetItems() []Branch
	// contains filtered or unexported methods
}

type ListProjectResponse

type ListProjectResponse interface {
	GetItems() []Project
	// contains filtered or unexported methods
}

type MockApp

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

MockApp is a mock of App interface.

func NewMockApp

func NewMockApp(ctrl *gomock.Controller) *MockApp

NewMockApp creates a new mock instance.

func (*MockApp) AddServer

func (m *MockApp) AddServer(arg0 Server)

AddServer mocks base method.

func (*MockApp) Auth

func (m *MockApp) Auth() auth.Auth

Auth mocks base method.

func (*MockApp) BeforeServerRunHooks

func (m *MockApp) BeforeServerRunHooks(arg0 Callback)

BeforeServerRunHooks mocks base method.

func (*MockApp) Bootstrap

func (m *MockApp) Bootstrap() error

Bootstrap mocks base method.

func (*MockApp) Cache

func (m *MockApp) Cache() cache.Cache

Cache mocks base method.

func (*MockApp) Config

func (m *MockApp) Config() *config.Config

Config mocks base method.

func (*MockApp) CronManager

func (m *MockApp) CronManager() cron.Manager

CronManager mocks base method.

func (*MockApp) DB

func (m *MockApp) DB() *ent.Client

DB mocks base method.

func (*MockApp) Data

func (m *MockApp) Data() data.Data

Data mocks base method.

func (*MockApp) Dispatcher

func (m *MockApp) Dispatcher() event.Dispatcher

Dispatcher mocks base method.

func (*MockApp) Done

func (m *MockApp) Done() <-chan struct{}

Done mocks base method.

func (*MockApp) EXPECT

func (m *MockApp) EXPECT() *MockAppMockRecorder

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

func (*MockApp) GrpcRegistry

func (m *MockApp) GrpcRegistry() *GrpcRegistry

GrpcRegistry mocks base method.

func (*MockApp) IsDebug

func (m *MockApp) IsDebug() bool

IsDebug mocks base method.

func (*MockApp) Locker

func (m *MockApp) Locker() locker.Locker

Locker mocks base method.

func (*MockApp) Logger

func (m *MockApp) Logger() mlog.Logger

Logger mocks base method.

func (*MockApp) Oidc

func (m *MockApp) Oidc() data.OidcConfig

Oidc mocks base method.

func (*MockApp) PluginMgr

func (m *MockApp) PluginMgr() PluginManger

PluginMgr mocks base method.

func (*MockApp) PrometheusRegistry

func (m *MockApp) PrometheusRegistry() *prometheus.Registry

PrometheusRegistry mocks base method.

func (*MockApp) RegisterAfterShutdownFunc

func (m *MockApp) RegisterAfterShutdownFunc(arg0 Callback)

RegisterAfterShutdownFunc mocks base method.

func (*MockApp) RegisterBeforeShutdownFunc

func (m *MockApp) RegisterBeforeShutdownFunc(arg0 Callback)

RegisterBeforeShutdownFunc mocks base method.

func (*MockApp) Run

func (m *MockApp) Run() context.Context

Run mocks base method.

func (*MockApp) Shutdown

func (m *MockApp) Shutdown()

Shutdown mocks base method.

func (*MockApp) Singleflight

func (m *MockApp) Singleflight() *singleflight.Group

Singleflight mocks base method.

func (*MockApp) Uploader

func (m *MockApp) Uploader() uploader.Uploader

Uploader mocks base method.

func (*MockApp) WsServer

func (m *MockApp) WsServer() WsHttpServer

WsServer mocks base method.

type MockAppMockRecorder

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

MockAppMockRecorder is the mock recorder for MockApp.

func (*MockAppMockRecorder) AddServer

func (mr *MockAppMockRecorder) AddServer(arg0 any) *gomock.Call

AddServer indicates an expected call of AddServer.

func (*MockAppMockRecorder) Auth

func (mr *MockAppMockRecorder) Auth() *gomock.Call

Auth indicates an expected call of Auth.

func (*MockAppMockRecorder) BeforeServerRunHooks

func (mr *MockAppMockRecorder) BeforeServerRunHooks(arg0 any) *gomock.Call

BeforeServerRunHooks indicates an expected call of BeforeServerRunHooks.

func (*MockAppMockRecorder) Bootstrap

func (mr *MockAppMockRecorder) Bootstrap() *gomock.Call

Bootstrap indicates an expected call of Bootstrap.

func (*MockAppMockRecorder) Cache

func (mr *MockAppMockRecorder) Cache() *gomock.Call

Cache indicates an expected call of Cache.

func (*MockAppMockRecorder) Config

func (mr *MockAppMockRecorder) Config() *gomock.Call

Config indicates an expected call of Config.

func (*MockAppMockRecorder) CronManager

func (mr *MockAppMockRecorder) CronManager() *gomock.Call

CronManager indicates an expected call of CronManager.

func (*MockAppMockRecorder) DB

func (mr *MockAppMockRecorder) DB() *gomock.Call

DB indicates an expected call of DB.

func (*MockAppMockRecorder) Data

func (mr *MockAppMockRecorder) Data() *gomock.Call

Data indicates an expected call of Data.

func (*MockAppMockRecorder) Dispatcher

func (mr *MockAppMockRecorder) Dispatcher() *gomock.Call

Dispatcher indicates an expected call of Dispatcher.

func (*MockAppMockRecorder) Done

func (mr *MockAppMockRecorder) Done() *gomock.Call

Done indicates an expected call of Done.

func (*MockAppMockRecorder) GrpcRegistry

func (mr *MockAppMockRecorder) GrpcRegistry() *gomock.Call

GrpcRegistry indicates an expected call of GrpcRegistry.

func (*MockAppMockRecorder) IsDebug

func (mr *MockAppMockRecorder) IsDebug() *gomock.Call

IsDebug indicates an expected call of IsDebug.

func (*MockAppMockRecorder) Locker

func (mr *MockAppMockRecorder) Locker() *gomock.Call

Locker indicates an expected call of Locker.

func (*MockAppMockRecorder) Logger

func (mr *MockAppMockRecorder) Logger() *gomock.Call

Logger indicates an expected call of Logger.

func (*MockAppMockRecorder) Oidc

func (mr *MockAppMockRecorder) Oidc() *gomock.Call

Oidc indicates an expected call of Oidc.

func (*MockAppMockRecorder) PluginMgr

func (mr *MockAppMockRecorder) PluginMgr() *gomock.Call

PluginMgr indicates an expected call of PluginMgr.

func (*MockAppMockRecorder) PrometheusRegistry

func (mr *MockAppMockRecorder) PrometheusRegistry() *gomock.Call

PrometheusRegistry indicates an expected call of PrometheusRegistry.

func (*MockAppMockRecorder) RegisterAfterShutdownFunc

func (mr *MockAppMockRecorder) RegisterAfterShutdownFunc(arg0 any) *gomock.Call

RegisterAfterShutdownFunc indicates an expected call of RegisterAfterShutdownFunc.

func (*MockAppMockRecorder) RegisterBeforeShutdownFunc

func (mr *MockAppMockRecorder) RegisterBeforeShutdownFunc(arg0 any) *gomock.Call

RegisterBeforeShutdownFunc indicates an expected call of RegisterBeforeShutdownFunc.

func (*MockAppMockRecorder) Run

func (mr *MockAppMockRecorder) Run() *gomock.Call

Run indicates an expected call of Run.

func (*MockAppMockRecorder) Shutdown

func (mr *MockAppMockRecorder) Shutdown() *gomock.Call

Shutdown indicates an expected call of Shutdown.

func (*MockAppMockRecorder) Singleflight

func (mr *MockAppMockRecorder) Singleflight() *gomock.Call

Singleflight indicates an expected call of Singleflight.

func (*MockAppMockRecorder) Uploader

func (mr *MockAppMockRecorder) Uploader() *gomock.Call

Uploader indicates an expected call of Uploader.

func (*MockAppMockRecorder) WsServer

func (mr *MockAppMockRecorder) WsServer() *gomock.Call

WsServer indicates an expected call of WsServer.

type MockBranch

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

MockBranch is a mock of Branch interface.

func NewMockBranch

func NewMockBranch(ctrl *gomock.Controller) *MockBranch

NewMockBranch creates a new mock instance.

func (*MockBranch) EXPECT

func (m *MockBranch) EXPECT() *MockBranchMockRecorder

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

func (*MockBranch) GetName

func (m *MockBranch) GetName() string

GetName mocks base method.

func (*MockBranch) GetWebURL

func (m *MockBranch) GetWebURL() string

GetWebURL mocks base method.

func (*MockBranch) IsDefault

func (m *MockBranch) IsDefault() bool

IsDefault mocks base method.

type MockBranchMockRecorder

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

MockBranchMockRecorder is the mock recorder for MockBranch.

func (*MockBranchMockRecorder) GetName

func (mr *MockBranchMockRecorder) GetName() *gomock.Call

GetName indicates an expected call of GetName.

func (*MockBranchMockRecorder) GetWebURL

func (mr *MockBranchMockRecorder) GetWebURL() *gomock.Call

GetWebURL indicates an expected call of GetWebURL.

func (*MockBranchMockRecorder) IsDefault

func (mr *MockBranchMockRecorder) IsDefault() *gomock.Call

IsDefault indicates an expected call of IsDefault.

type MockCommit

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

MockCommit is a mock of Commit interface.

func NewMockCommit

func NewMockCommit(ctrl *gomock.Controller) *MockCommit

NewMockCommit creates a new mock instance.

func (*MockCommit) EXPECT

func (m *MockCommit) EXPECT() *MockCommitMockRecorder

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

func (*MockCommit) GetAuthorEmail

func (m *MockCommit) GetAuthorEmail() string

GetAuthorEmail mocks base method.

func (*MockCommit) GetAuthorName

func (m *MockCommit) GetAuthorName() string

GetAuthorName mocks base method.

func (*MockCommit) GetCommittedDate

func (m *MockCommit) GetCommittedDate() *time.Time

GetCommittedDate mocks base method.

func (*MockCommit) GetCommitterEmail

func (m *MockCommit) GetCommitterEmail() string

GetCommitterEmail mocks base method.

func (*MockCommit) GetCommitterName

func (m *MockCommit) GetCommitterName() string

GetCommitterName mocks base method.

func (*MockCommit) GetCreatedAt

func (m *MockCommit) GetCreatedAt() *time.Time

GetCreatedAt mocks base method.

func (*MockCommit) GetID

func (m *MockCommit) GetID() string

GetID mocks base method.

func (*MockCommit) GetMessage

func (m *MockCommit) GetMessage() string

GetMessage mocks base method.

func (*MockCommit) GetProjectID

func (m *MockCommit) GetProjectID() int64

GetProjectID mocks base method.

func (*MockCommit) GetShortID

func (m *MockCommit) GetShortID() string

GetShortID mocks base method.

func (*MockCommit) GetTitle

func (m *MockCommit) GetTitle() string

GetTitle mocks base method.

func (*MockCommit) GetWebURL

func (m *MockCommit) GetWebURL() string

GetWebURL mocks base method.

type MockCommitMockRecorder

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

MockCommitMockRecorder is the mock recorder for MockCommit.

func (*MockCommitMockRecorder) GetAuthorEmail

func (mr *MockCommitMockRecorder) GetAuthorEmail() *gomock.Call

GetAuthorEmail indicates an expected call of GetAuthorEmail.

func (*MockCommitMockRecorder) GetAuthorName

func (mr *MockCommitMockRecorder) GetAuthorName() *gomock.Call

GetAuthorName indicates an expected call of GetAuthorName.

func (*MockCommitMockRecorder) GetCommittedDate

func (mr *MockCommitMockRecorder) GetCommittedDate() *gomock.Call

GetCommittedDate indicates an expected call of GetCommittedDate.

func (*MockCommitMockRecorder) GetCommitterEmail

func (mr *MockCommitMockRecorder) GetCommitterEmail() *gomock.Call

GetCommitterEmail indicates an expected call of GetCommitterEmail.

func (*MockCommitMockRecorder) GetCommitterName

func (mr *MockCommitMockRecorder) GetCommitterName() *gomock.Call

GetCommitterName indicates an expected call of GetCommitterName.

func (*MockCommitMockRecorder) GetCreatedAt

func (mr *MockCommitMockRecorder) GetCreatedAt() *gomock.Call

GetCreatedAt indicates an expected call of GetCreatedAt.

func (*MockCommitMockRecorder) GetID

func (mr *MockCommitMockRecorder) GetID() *gomock.Call

GetID indicates an expected call of GetID.

func (*MockCommitMockRecorder) GetMessage

func (mr *MockCommitMockRecorder) GetMessage() *gomock.Call

GetMessage indicates an expected call of GetMessage.

func (*MockCommitMockRecorder) GetProjectID

func (mr *MockCommitMockRecorder) GetProjectID() *gomock.Call

GetProjectID indicates an expected call of GetProjectID.

func (*MockCommitMockRecorder) GetShortID

func (mr *MockCommitMockRecorder) GetShortID() *gomock.Call

GetShortID indicates an expected call of GetShortID.

func (*MockCommitMockRecorder) GetTitle

func (mr *MockCommitMockRecorder) GetTitle() *gomock.Call

GetTitle indicates an expected call of GetTitle.

func (*MockCommitMockRecorder) GetWebURL

func (mr *MockCommitMockRecorder) GetWebURL() *gomock.Call

GetWebURL indicates an expected call of GetWebURL.

type MockDomainManager

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

MockDomainManager is a mock of DomainManager interface.

func NewMockDomainManager

func NewMockDomainManager(ctrl *gomock.Controller) *MockDomainManager

NewMockDomainManager creates a new mock instance.

func (*MockDomainManager) Destroy

func (m *MockDomainManager) Destroy() error

Destroy mocks base method.

func (*MockDomainManager) EXPECT

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

func (*MockDomainManager) GetCertSecretName

func (m *MockDomainManager) GetCertSecretName(arg0 string, arg1 int) string

GetCertSecretName mocks base method.

func (*MockDomainManager) GetCerts

func (m *MockDomainManager) GetCerts() (string, string, string)

GetCerts mocks base method.

func (*MockDomainManager) GetClusterIssuer

func (m *MockDomainManager) GetClusterIssuer() string

GetClusterIssuer mocks base method.

func (*MockDomainManager) GetDomain

func (m *MockDomainManager) GetDomain(arg0, arg1 string, arg2 int) string

GetDomain mocks base method.

func (*MockDomainManager) GetDomainByIndex

func (m *MockDomainManager) GetDomainByIndex(arg0, arg1 string, arg2, arg3 int) string

GetDomainByIndex mocks base method.

func (*MockDomainManager) Initialize

func (m *MockDomainManager) Initialize(arg0 App, arg1 map[string]any) error

Initialize mocks base method.

func (*MockDomainManager) Name

func (m *MockDomainManager) Name() string

Name mocks base method.

type MockDomainManagerMockRecorder

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

MockDomainManagerMockRecorder is the mock recorder for MockDomainManager.

func (*MockDomainManagerMockRecorder) Destroy

func (mr *MockDomainManagerMockRecorder) Destroy() *gomock.Call

Destroy indicates an expected call of Destroy.

func (*MockDomainManagerMockRecorder) GetCertSecretName

func (mr *MockDomainManagerMockRecorder) GetCertSecretName(arg0, arg1 any) *gomock.Call

GetCertSecretName indicates an expected call of GetCertSecretName.

func (*MockDomainManagerMockRecorder) GetCerts

func (mr *MockDomainManagerMockRecorder) GetCerts() *gomock.Call

GetCerts indicates an expected call of GetCerts.

func (*MockDomainManagerMockRecorder) GetClusterIssuer

func (mr *MockDomainManagerMockRecorder) GetClusterIssuer() *gomock.Call

GetClusterIssuer indicates an expected call of GetClusterIssuer.

func (*MockDomainManagerMockRecorder) GetDomain

func (mr *MockDomainManagerMockRecorder) GetDomain(arg0, arg1, arg2 any) *gomock.Call

GetDomain indicates an expected call of GetDomain.

func (*MockDomainManagerMockRecorder) GetDomainByIndex

func (mr *MockDomainManagerMockRecorder) GetDomainByIndex(arg0, arg1, arg2, arg3 any) *gomock.Call

GetDomainByIndex indicates an expected call of GetDomainByIndex.

func (*MockDomainManagerMockRecorder) Initialize

func (mr *MockDomainManagerMockRecorder) Initialize(arg0, arg1 any) *gomock.Call

Initialize indicates an expected call of Initialize.

func (*MockDomainManagerMockRecorder) Name

Name indicates an expected call of Name.

type MockGitServer

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

MockGitServer is a mock of GitServer interface.

func NewMockGitServer

func NewMockGitServer(ctrl *gomock.Controller) *MockGitServer

NewMockGitServer creates a new mock instance.

func (*MockGitServer) AllBranches

func (m *MockGitServer) AllBranches(arg0 string) ([]Branch, error)

AllBranches mocks base method.

func (*MockGitServer) AllProjects

func (m *MockGitServer) AllProjects() ([]Project, error)

AllProjects mocks base method.

func (*MockGitServer) Destroy

func (m *MockGitServer) Destroy() error

Destroy mocks base method.

func (*MockGitServer) EXPECT

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

func (*MockGitServer) GetCommit

func (m *MockGitServer) GetCommit(arg0, arg1 string) (Commit, error)

GetCommit mocks base method.

func (*MockGitServer) GetCommitPipeline

func (m *MockGitServer) GetCommitPipeline(arg0, arg1, arg2 string) (Pipeline, error)

GetCommitPipeline mocks base method.

func (*MockGitServer) GetDirectoryFilesWithBranch

func (m *MockGitServer) GetDirectoryFilesWithBranch(arg0, arg1, arg2 string, arg3 bool) ([]string, error)

GetDirectoryFilesWithBranch mocks base method.

func (*MockGitServer) GetDirectoryFilesWithSha

func (m *MockGitServer) GetDirectoryFilesWithSha(arg0, arg1, arg2 string, arg3 bool) ([]string, error)

GetDirectoryFilesWithSha mocks base method.

func (*MockGitServer) GetFileContentWithBranch

func (m *MockGitServer) GetFileContentWithBranch(arg0, arg1, arg2 string) (string, error)

GetFileContentWithBranch mocks base method.

func (*MockGitServer) GetFileContentWithSha

func (m *MockGitServer) GetFileContentWithSha(arg0, arg1, arg2 string) (string, error)

GetFileContentWithSha mocks base method.

func (*MockGitServer) GetProject

func (m *MockGitServer) GetProject(arg0 string) (Project, error)

GetProject mocks base method.

func (*MockGitServer) Initialize

func (m *MockGitServer) Initialize(arg0 App, arg1 map[string]any) error

Initialize mocks base method.

func (*MockGitServer) ListBranches

func (m *MockGitServer) ListBranches(arg0 string, arg1, arg2 int) (ListBranchResponse, error)

ListBranches mocks base method.

func (*MockGitServer) ListCommits

func (m *MockGitServer) ListCommits(arg0, arg1 string) ([]Commit, error)

ListCommits mocks base method.

func (*MockGitServer) ListProjects

func (m *MockGitServer) ListProjects(arg0, arg1 int) (ListProjectResponse, error)

ListProjects mocks base method.

func (*MockGitServer) Name

func (m *MockGitServer) Name() string

Name mocks base method.

type MockGitServerMockRecorder

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

MockGitServerMockRecorder is the mock recorder for MockGitServer.

func (*MockGitServerMockRecorder) AllBranches

func (mr *MockGitServerMockRecorder) AllBranches(arg0 any) *gomock.Call

AllBranches indicates an expected call of AllBranches.

func (*MockGitServerMockRecorder) AllProjects

func (mr *MockGitServerMockRecorder) AllProjects() *gomock.Call

AllProjects indicates an expected call of AllProjects.

func (*MockGitServerMockRecorder) Destroy

func (mr *MockGitServerMockRecorder) Destroy() *gomock.Call

Destroy indicates an expected call of Destroy.

func (*MockGitServerMockRecorder) GetCommit

func (mr *MockGitServerMockRecorder) GetCommit(arg0, arg1 any) *gomock.Call

GetCommit indicates an expected call of GetCommit.

func (*MockGitServerMockRecorder) GetCommitPipeline

func (mr *MockGitServerMockRecorder) GetCommitPipeline(arg0, arg1, arg2 any) *gomock.Call

GetCommitPipeline indicates an expected call of GetCommitPipeline.

func (*MockGitServerMockRecorder) GetDirectoryFilesWithBranch

func (mr *MockGitServerMockRecorder) GetDirectoryFilesWithBranch(arg0, arg1, arg2, arg3 any) *gomock.Call

GetDirectoryFilesWithBranch indicates an expected call of GetDirectoryFilesWithBranch.

func (*MockGitServerMockRecorder) GetDirectoryFilesWithSha

func (mr *MockGitServerMockRecorder) GetDirectoryFilesWithSha(arg0, arg1, arg2, arg3 any) *gomock.Call

GetDirectoryFilesWithSha indicates an expected call of GetDirectoryFilesWithSha.

func (*MockGitServerMockRecorder) GetFileContentWithBranch

func (mr *MockGitServerMockRecorder) GetFileContentWithBranch(arg0, arg1, arg2 any) *gomock.Call

GetFileContentWithBranch indicates an expected call of GetFileContentWithBranch.

func (*MockGitServerMockRecorder) GetFileContentWithSha

func (mr *MockGitServerMockRecorder) GetFileContentWithSha(arg0, arg1, arg2 any) *gomock.Call

GetFileContentWithSha indicates an expected call of GetFileContentWithSha.

func (*MockGitServerMockRecorder) GetProject

func (mr *MockGitServerMockRecorder) GetProject(arg0 any) *gomock.Call

GetProject indicates an expected call of GetProject.

func (*MockGitServerMockRecorder) Initialize

func (mr *MockGitServerMockRecorder) Initialize(arg0, arg1 any) *gomock.Call

Initialize indicates an expected call of Initialize.

func (*MockGitServerMockRecorder) ListBranches

func (mr *MockGitServerMockRecorder) ListBranches(arg0, arg1, arg2 any) *gomock.Call

ListBranches indicates an expected call of ListBranches.

func (*MockGitServerMockRecorder) ListCommits

func (mr *MockGitServerMockRecorder) ListCommits(arg0, arg1 any) *gomock.Call

ListCommits indicates an expected call of ListCommits.

func (*MockGitServerMockRecorder) ListProjects

func (mr *MockGitServerMockRecorder) ListProjects(arg0, arg1 any) *gomock.Call

ListProjects indicates an expected call of ListProjects.

func (*MockGitServerMockRecorder) Name

Name indicates an expected call of Name.

type MockPicture

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

MockPicture is a mock of Picture interface.

func NewMockPicture

func NewMockPicture(ctrl *gomock.Controller) *MockPicture

NewMockPicture creates a new mock instance.

func (*MockPicture) Destroy

func (m *MockPicture) Destroy() error

Destroy mocks base method.

func (*MockPicture) EXPECT

func (m *MockPicture) EXPECT() *MockPictureMockRecorder

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

func (*MockPicture) Get

func (m *MockPicture) Get(arg0 context.Context, arg1 bool) (*PictureItem, error)

Get mocks base method.

func (*MockPicture) Initialize

func (m *MockPicture) Initialize(arg0 App, arg1 map[string]any) error

Initialize mocks base method.

func (*MockPicture) Name

func (m *MockPicture) Name() string

Name mocks base method.

type MockPictureMockRecorder

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

MockPictureMockRecorder is the mock recorder for MockPicture.

func (*MockPictureMockRecorder) Destroy

func (mr *MockPictureMockRecorder) Destroy() *gomock.Call

Destroy indicates an expected call of Destroy.

func (*MockPictureMockRecorder) Get

func (mr *MockPictureMockRecorder) Get(arg0, arg1 any) *gomock.Call

Get indicates an expected call of Get.

func (*MockPictureMockRecorder) Initialize

func (mr *MockPictureMockRecorder) Initialize(arg0, arg1 any) *gomock.Call

Initialize indicates an expected call of Initialize.

func (*MockPictureMockRecorder) Name

func (mr *MockPictureMockRecorder) Name() *gomock.Call

Name indicates an expected call of Name.

type MockPipeline

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

MockPipeline is a mock of Pipeline interface.

func NewMockPipeline

func NewMockPipeline(ctrl *gomock.Controller) *MockPipeline

NewMockPipeline creates a new mock instance.

func (*MockPipeline) EXPECT

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

func (*MockPipeline) GetCreatedAt

func (m *MockPipeline) GetCreatedAt() *time.Time

GetCreatedAt mocks base method.

func (*MockPipeline) GetID

func (m *MockPipeline) GetID() int64

GetID mocks base method.

func (*MockPipeline) GetProjectID

func (m *MockPipeline) GetProjectID() int64

GetProjectID mocks base method.

func (*MockPipeline) GetRef

func (m *MockPipeline) GetRef() string

GetRef mocks base method.

func (*MockPipeline) GetSHA

func (m *MockPipeline) GetSHA() string

GetSHA mocks base method.

func (*MockPipeline) GetStatus

func (m *MockPipeline) GetStatus() string

GetStatus mocks base method.

func (*MockPipeline) GetUpdatedAt

func (m *MockPipeline) GetUpdatedAt() *time.Time

GetUpdatedAt mocks base method.

func (*MockPipeline) GetWebURL

func (m *MockPipeline) GetWebURL() string

GetWebURL mocks base method.

type MockPipelineMockRecorder

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

MockPipelineMockRecorder is the mock recorder for MockPipeline.

func (*MockPipelineMockRecorder) GetCreatedAt

func (mr *MockPipelineMockRecorder) GetCreatedAt() *gomock.Call

GetCreatedAt indicates an expected call of GetCreatedAt.

func (*MockPipelineMockRecorder) GetID

func (mr *MockPipelineMockRecorder) GetID() *gomock.Call

GetID indicates an expected call of GetID.

func (*MockPipelineMockRecorder) GetProjectID

func (mr *MockPipelineMockRecorder) GetProjectID() *gomock.Call

GetProjectID indicates an expected call of GetProjectID.

func (*MockPipelineMockRecorder) GetRef

func (mr *MockPipelineMockRecorder) GetRef() *gomock.Call

GetRef indicates an expected call of GetRef.

func (*MockPipelineMockRecorder) GetSHA

func (mr *MockPipelineMockRecorder) GetSHA() *gomock.Call

GetSHA indicates an expected call of GetSHA.

func (*MockPipelineMockRecorder) GetStatus

func (mr *MockPipelineMockRecorder) GetStatus() *gomock.Call

GetStatus indicates an expected call of GetStatus.

func (*MockPipelineMockRecorder) GetUpdatedAt

func (mr *MockPipelineMockRecorder) GetUpdatedAt() *gomock.Call

GetUpdatedAt indicates an expected call of GetUpdatedAt.

func (*MockPipelineMockRecorder) GetWebURL

func (mr *MockPipelineMockRecorder) GetWebURL() *gomock.Call

GetWebURL indicates an expected call of GetWebURL.

type MockPluginManger

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

MockPluginManger is a mock of PluginManger interface.

func NewMockPluginManger

func NewMockPluginManger(ctrl *gomock.Controller) *MockPluginManger

NewMockPluginManger creates a new mock instance.

func (*MockPluginManger) Domain

func (m *MockPluginManger) Domain() DomainManager

Domain mocks base method.

func (*MockPluginManger) EXPECT

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

func (*MockPluginManger) GetPlugins

func (m *MockPluginManger) GetPlugins() map[string]Plugin

GetPlugins mocks base method.

func (*MockPluginManger) Git

func (m *MockPluginManger) Git() GitServer

Git mocks base method.

func (*MockPluginManger) Load

func (m *MockPluginManger) Load(arg0 App) error

Load mocks base method.

func (*MockPluginManger) Picture

func (m *MockPluginManger) Picture() Picture

Picture mocks base method.

func (*MockPluginManger) Ws

func (m *MockPluginManger) Ws() WsSender

Ws mocks base method.

type MockPluginMangerMockRecorder

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

MockPluginMangerMockRecorder is the mock recorder for MockPluginManger.

func (*MockPluginMangerMockRecorder) Domain

Domain indicates an expected call of Domain.

func (*MockPluginMangerMockRecorder) GetPlugins

func (mr *MockPluginMangerMockRecorder) GetPlugins() *gomock.Call

GetPlugins indicates an expected call of GetPlugins.

func (*MockPluginMangerMockRecorder) Git

Git indicates an expected call of Git.

func (*MockPluginMangerMockRecorder) Load

func (mr *MockPluginMangerMockRecorder) Load(arg0 any) *gomock.Call

Load indicates an expected call of Load.

func (*MockPluginMangerMockRecorder) Picture

func (mr *MockPluginMangerMockRecorder) Picture() *gomock.Call

Picture indicates an expected call of Picture.

func (*MockPluginMangerMockRecorder) Ws

Ws indicates an expected call of Ws.

type MockProject

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

MockProject is a mock of Project interface.

func NewMockProject

func NewMockProject(ctrl *gomock.Controller) *MockProject

NewMockProject creates a new mock instance.

func (*MockProject) EXPECT

func (m *MockProject) EXPECT() *MockProjectMockRecorder

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

func (*MockProject) GetAvatarURL

func (m *MockProject) GetAvatarURL() string

GetAvatarURL mocks base method.

func (*MockProject) GetDefaultBranch

func (m *MockProject) GetDefaultBranch() string

GetDefaultBranch mocks base method.

func (*MockProject) GetDescription

func (m *MockProject) GetDescription() string

GetDescription mocks base method.

func (*MockProject) GetID

func (m *MockProject) GetID() int64

GetID mocks base method.

func (*MockProject) GetName

func (m *MockProject) GetName() string

GetName mocks base method.

func (*MockProject) GetPath

func (m *MockProject) GetPath() string

GetPath mocks base method.

func (*MockProject) GetWebURL

func (m *MockProject) GetWebURL() string

GetWebURL mocks base method.

type MockProjectMockRecorder

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

MockProjectMockRecorder is the mock recorder for MockProject.

func (*MockProjectMockRecorder) GetAvatarURL

func (mr *MockProjectMockRecorder) GetAvatarURL() *gomock.Call

GetAvatarURL indicates an expected call of GetAvatarURL.

func (*MockProjectMockRecorder) GetDefaultBranch

func (mr *MockProjectMockRecorder) GetDefaultBranch() *gomock.Call

GetDefaultBranch indicates an expected call of GetDefaultBranch.

func (*MockProjectMockRecorder) GetDescription

func (mr *MockProjectMockRecorder) GetDescription() *gomock.Call

GetDescription indicates an expected call of GetDescription.

func (*MockProjectMockRecorder) GetID

func (mr *MockProjectMockRecorder) GetID() *gomock.Call

GetID indicates an expected call of GetID.

func (*MockProjectMockRecorder) GetName

func (mr *MockProjectMockRecorder) GetName() *gomock.Call

GetName indicates an expected call of GetName.

func (*MockProjectMockRecorder) GetPath

func (mr *MockProjectMockRecorder) GetPath() *gomock.Call

GetPath indicates an expected call of GetPath.

func (*MockProjectMockRecorder) GetWebURL

func (mr *MockProjectMockRecorder) GetWebURL() *gomock.Call

GetWebURL indicates an expected call of GetWebURL.

type MockProjectPodEventPublisher

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

MockProjectPodEventPublisher is a mock of ProjectPodEventPublisher interface.

func NewMockProjectPodEventPublisher

func NewMockProjectPodEventPublisher(ctrl *gomock.Controller) *MockProjectPodEventPublisher

NewMockProjectPodEventPublisher creates a new mock instance.

func (*MockProjectPodEventPublisher) EXPECT

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

func (*MockProjectPodEventPublisher) Publish

func (m *MockProjectPodEventPublisher) Publish(arg0 int64, arg1 *v1.Pod) error

Publish mocks base method.

type MockProjectPodEventPublisherMockRecorder

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

MockProjectPodEventPublisherMockRecorder is the mock recorder for MockProjectPodEventPublisher.

func (*MockProjectPodEventPublisherMockRecorder) Publish

func (mr *MockProjectPodEventPublisherMockRecorder) Publish(arg0, arg1 any) *gomock.Call

Publish indicates an expected call of Publish.

type MockPubSub

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

MockPubSub is a mock of PubSub interface.

func NewMockPubSub

func NewMockPubSub(ctrl *gomock.Controller) *MockPubSub

NewMockPubSub creates a new mock instance.

func (*MockPubSub) Close

func (m *MockPubSub) Close() error

Close mocks base method.

func (*MockPubSub) EXPECT

func (m *MockPubSub) EXPECT() *MockPubSubMockRecorder

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

func (*MockPubSub) ID

func (m *MockPubSub) ID() string

ID mocks base method.

func (*MockPubSub) Info

func (m *MockPubSub) Info() any

Info mocks base method.

func (*MockPubSub) Join

func (m *MockPubSub) Join(arg0 int64) error

Join mocks base method.

func (*MockPubSub) Leave

func (m *MockPubSub) Leave(arg0, arg1 int64) error

Leave mocks base method.

func (*MockPubSub) Publish

func (m *MockPubSub) Publish(arg0 int64, arg1 *v1.Pod) error

Publish mocks base method.

func (*MockPubSub) Run

func (m *MockPubSub) Run(arg0 context.Context) error

Run mocks base method.

func (*MockPubSub) Subscribe

func (m *MockPubSub) Subscribe() <-chan []byte

Subscribe mocks base method.

func (*MockPubSub) ToAll

func (m *MockPubSub) ToAll(arg0 WebsocketMessage) error

ToAll mocks base method.

func (*MockPubSub) ToOthers

func (m *MockPubSub) ToOthers(arg0 WebsocketMessage) error

ToOthers mocks base method.

func (*MockPubSub) ToSelf

func (m *MockPubSub) ToSelf(arg0 WebsocketMessage) error

ToSelf mocks base method.

func (*MockPubSub) Uid

func (m *MockPubSub) Uid() string

Uid mocks base method.

type MockPubSubMockRecorder

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

MockPubSubMockRecorder is the mock recorder for MockPubSub.

func (*MockPubSubMockRecorder) Close

func (mr *MockPubSubMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close.

func (*MockPubSubMockRecorder) ID

ID indicates an expected call of ID.

func (*MockPubSubMockRecorder) Info

func (mr *MockPubSubMockRecorder) Info() *gomock.Call

Info indicates an expected call of Info.

func (*MockPubSubMockRecorder) Join

func (mr *MockPubSubMockRecorder) Join(arg0 any) *gomock.Call

Join indicates an expected call of Join.

func (*MockPubSubMockRecorder) Leave

func (mr *MockPubSubMockRecorder) Leave(arg0, arg1 any) *gomock.Call

Leave indicates an expected call of Leave.

func (*MockPubSubMockRecorder) Publish

func (mr *MockPubSubMockRecorder) Publish(arg0, arg1 any) *gomock.Call

Publish indicates an expected call of Publish.

func (*MockPubSubMockRecorder) Run

func (mr *MockPubSubMockRecorder) Run(arg0 any) *gomock.Call

Run indicates an expected call of Run.

func (*MockPubSubMockRecorder) Subscribe

func (mr *MockPubSubMockRecorder) Subscribe() *gomock.Call

Subscribe indicates an expected call of Subscribe.

func (*MockPubSubMockRecorder) ToAll

func (mr *MockPubSubMockRecorder) ToAll(arg0 any) *gomock.Call

ToAll indicates an expected call of ToAll.

func (*MockPubSubMockRecorder) ToOthers

func (mr *MockPubSubMockRecorder) ToOthers(arg0 any) *gomock.Call

ToOthers indicates an expected call of ToOthers.

func (*MockPubSubMockRecorder) ToSelf

func (mr *MockPubSubMockRecorder) ToSelf(arg0 any) *gomock.Call

ToSelf indicates an expected call of ToSelf.

func (*MockPubSubMockRecorder) Uid

func (mr *MockPubSubMockRecorder) Uid() *gomock.Call

Uid indicates an expected call of Uid.

type MockWsHttpServer

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

MockWsHttpServer is a mock of WsHttpServer interface.

func NewMockWsHttpServer

func NewMockWsHttpServer(ctrl *gomock.Controller) *MockWsHttpServer

NewMockWsHttpServer creates a new mock instance.

func (*MockWsHttpServer) EXPECT

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

func (*MockWsHttpServer) Info

func (m *MockWsHttpServer) Info(arg0 http.ResponseWriter, arg1 *http.Request)

Info mocks base method.

func (*MockWsHttpServer) Serve

func (m *MockWsHttpServer) Serve(arg0 http.ResponseWriter, arg1 *http.Request)

Serve mocks base method.

func (*MockWsHttpServer) Shutdown

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

Shutdown mocks base method.

func (*MockWsHttpServer) TickClusterHealth

func (m *MockWsHttpServer) TickClusterHealth(arg0 <-chan struct{})

TickClusterHealth mocks base method.

type MockWsHttpServerMockRecorder

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

MockWsHttpServerMockRecorder is the mock recorder for MockWsHttpServer.

func (*MockWsHttpServerMockRecorder) Info

func (mr *MockWsHttpServerMockRecorder) Info(arg0, arg1 any) *gomock.Call

Info indicates an expected call of Info.

func (*MockWsHttpServerMockRecorder) Serve

func (mr *MockWsHttpServerMockRecorder) Serve(arg0, arg1 any) *gomock.Call

Serve indicates an expected call of Serve.

func (*MockWsHttpServerMockRecorder) Shutdown

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

Shutdown indicates an expected call of Shutdown.

func (*MockWsHttpServerMockRecorder) TickClusterHealth

func (mr *MockWsHttpServerMockRecorder) TickClusterHealth(arg0 any) *gomock.Call

TickClusterHealth indicates an expected call of TickClusterHealth.

type MockWsSender

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

MockWsSender is a mock of WsSender interface.

func NewMockWsSender

func NewMockWsSender(ctrl *gomock.Controller) *MockWsSender

NewMockWsSender creates a new mock instance.

func (*MockWsSender) Destroy

func (m *MockWsSender) Destroy() error

Destroy mocks base method.

func (*MockWsSender) EXPECT

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

func (*MockWsSender) Initialize

func (m *MockWsSender) Initialize(arg0 App, arg1 map[string]any) error

Initialize mocks base method.

func (*MockWsSender) Name

func (m *MockWsSender) Name() string

Name mocks base method.

func (*MockWsSender) New

func (m *MockWsSender) New(arg0, arg1 string) PubSub

New mocks base method.

type MockWsSenderMockRecorder

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

MockWsSenderMockRecorder is the mock recorder for MockWsSender.

func (*MockWsSenderMockRecorder) Destroy

func (mr *MockWsSenderMockRecorder) Destroy() *gomock.Call

Destroy indicates an expected call of Destroy.

func (*MockWsSenderMockRecorder) Initialize

func (mr *MockWsSenderMockRecorder) Initialize(arg0, arg1 any) *gomock.Call

Initialize indicates an expected call of Initialize.

func (*MockWsSenderMockRecorder) Name

func (mr *MockWsSenderMockRecorder) Name() *gomock.Call

Name indicates an expected call of Name.

func (*MockWsSenderMockRecorder) New

func (mr *MockWsSenderMockRecorder) New(arg0, arg1 any) *gomock.Call

New indicates an expected call of New.

type Option

type Option func(*app)

func WithBootstrappers

func WithBootstrappers(bootstrappers ...Bootstrapper) Option

WithBootstrappers custom boots.

func WithExcludeTags

func WithExcludeTags(tags ...string) Option

WithExcludeTags set excludeTags.

type Picture

type Picture interface {
	Plugin

	// Get picture.
	Get(ctx context.Context, random bool) (*PictureItem, error)
}

type PictureItem

type PictureItem struct {
	Url       string
	Copyright string
}

type Pipeline

type Pipeline interface {
	GetID() int64
	GetProjectID() int64
	GetStatus() Status
	GetRef() string
	GetSHA() string
	GetWebURL() string
	GetUpdatedAt() *time.Time
	GetCreatedAt() *time.Time
}

type Plugin

type Plugin interface {
	// Name plugin name.
	Name() string
	// Initialize init plugin.
	Initialize(app App, args map[string]any) error
	// Destroy plugin.
	Destroy() error
}

type PluginManger

type PluginManger interface {
	Load(App) error
	Domain() DomainManager
	Ws() WsSender
	Git() GitServer
	Picture() Picture

	GetPlugins() map[string]Plugin
}

func NewPluginManager

func NewPluginManager(cfg *config.Config, logger mlog.Logger) (PluginManger, error)

type Project

type Project interface {
	GetID() int64
	GetName() string
	GetDefaultBranch() string
	GetPath() string
	GetWebURL() string
	GetAvatarURL() string
	GetDescription() string
}

type ProjectPodEventPublisher

type ProjectPodEventPublisher interface {
	Publish(nsID int64, pod *corev1.Pod) error
}

type ProjectPodEventSubscriber

type ProjectPodEventSubscriber interface {
	Join(projectID int64) error
	Leave(nsID int64, projectID int64) error
	Run(ctx context.Context) error
}

type PubSub

type PubSub interface {
	ProjectPodEventSubscriber
	ProjectPodEventPublisher

	Info() any
	Uid() string
	ID() string
	ToSelf(WebsocketMessage) error
	ToAll(WebsocketMessage) error
	ToOthers(WebsocketMessage) error
	Subscribe() <-chan []byte
	Close() error
}

type RegistryFunc

type RegistryFunc = func(s grpc.ServiceRegistrar)

type Server

type Server interface {
	// Run server.
	Run(context.Context) error
	// Shutdown server.
	Shutdown(context.Context) error
}

Server define booting server.

type Status

type Status = string
const (
	StatusUnknown Status = "unknown"
	StatusSuccess Status = "success"
	StatusFailed  Status = "failed"
	StatusRunning Status = "running"
)

type WebsocketMessage

type WebsocketMessage interface {
	proto.Message
	GetMetadata() *websocket.Metadata
}

type WsHttpServer

type WsHttpServer interface {
	TickClusterHealth(done <-chan struct{})
	Info(writer http.ResponseWriter, request *http.Request)
	Serve(w http.ResponseWriter, r *http.Request)
	Shutdown(ctx context.Context) error
}

type WsSender

type WsSender interface {
	Plugin

	// New PubSub
	New(uid, id string) PubSub
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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