Documentation ¶
Index ¶
- Variables
- type LogWatcher
- type Metrics
- type Offstage
- func (o Offstage) DisplayConfig(serverName string) ([]byte, error)
- func (o Offstage) DisplayServersStatus() ([]byte, error)
- func (o Offstage) GetConfig(serverName string) ([]byte, error)
- func (o Offstage) Range(rangeFunc func(serverName string, configService WebServerConfigService) bool)
- func (o Offstage) ShowStatistics(serverName string) ([]byte, error)
- func (o *Offstage) Start() error
- func (o *Offstage) Stop() error
- func (o *Offstage) UpdateConfig(serverName string, data []byte) error
- func (o Offstage) WatchLog(serverName, logName string) (LogWatcher, error)
- type OffstageManager
- type RequestType
- type Service
- type ServiceMiddleware
- type State
- type UpdateRequestInfo
- type UpdateResponseInfo
- type Updater
- type UpdaterMiddleware
- type ViewRequestInfo
- type ViewResponseInfo
- type Viewer
- type ViewerMiddleware
- type WatchRequestInfo
- type WatchResponseInfo
- type Watcher
- type WatcherMiddleware
- type WebServerConfigService
- type WebServerInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCheckTokenUnknownError = errors.New("an unknown error occurred while verifying token") ErrUnknownRequestType = errors.New("an unknown request type") ErrConnToAuthSvr = errors.New("failed to connect to authentication server") ErrWebServerConfigServiceNotExist = errors.New("web server config service is not exist") // Monitor Error ErrStopMonitoringTimeout = errors.New("stop monitoring timeout") ErrMonitoringServiceSuspension = errors.New("monitoring service suspension") ErrMonitoringStarted = errors.New("monitoring started") // offstage Error ErrDataSendingTimeout = errors.New("data sending timeout") ErrWatchLogTimeout = errors.New("the WatchLog operation timed out") ErrLogWatcherCloseTimeout = errors.New("the LogWatcher Close timed out") // request input Error ErrNilRequestInfo = errors.New("requestInfo parameter is nil") // responseInfo Error ErrInvalidResponseInfo = errors.New("invalid response info object") )
Functions ¶
This section is empty.
Types ¶
type LogWatcher ¶
type LogWatcher interface { GetDataChan() <-chan []byte GetTransferErrorChan() <-chan error Close() error }
func NewLogWatcher ¶
func NewLogWatcher(dataChan chan []byte, errChan chan error, closeFunc func() error) LogWatcher
type Metrics ¶
func NewMetrics ¶
func NewMetrics(webServerInfoFunc func() []WebServerInfo, errChan chan error) Metrics
type Offstage ¶
type Offstage struct {
// contains filtered or unexported fields
}
func NewOffstage ¶
func NewOffstage(services map[string]WebServerConfigService, configManagers map[string]configuration.ConfigManager, metrics Metrics) *Offstage
func (Offstage) DisplayServersStatus ¶
func (Offstage) Range ¶
func (o Offstage) Range(rangeFunc func(serverName string, configService WebServerConfigService) bool)
func (Offstage) ShowStatistics ¶
func (*Offstage) UpdateConfig ¶
type OffstageManager ¶
type RequestType ¶
type RequestType int
const ( UnknownReqType RequestType = iota DisplayConfig GetConfig ShowStatistics DisplayServersStatus UpdateConfig WatchLog )
type ServiceMiddleware ¶
ServiceMiddleware define service middleware
type UpdateRequestInfo ¶
type UpdateRequestInfo interface {
// contains filtered or unexported methods
}
func NewUpdateRequestInfo ¶
func NewUpdateRequestInfo(ctx context.Context, reqTypeStr, serverName, token string, data []byte) UpdateRequestInfo
type UpdateResponseInfo ¶
type UpdateResponseInfo interface {
// contains filtered or unexported methods
}
func NewUpdateResponseInfo ¶
func NewUpdateResponseInfo(serverName string, respErr error) UpdateResponseInfo
type Updater ¶
type Updater interface {
Update(UpdateRequestInfo) UpdateResponseInfo
}
func NewUpdater ¶
func NewUpdater(offstage offstageUpdater) Updater
type UpdaterMiddleware ¶
type ViewRequestInfo ¶
type ViewRequestInfo interface {
// contains filtered or unexported methods
}
func NewViewRequestInfo ¶
func NewViewRequestInfo(ctx context.Context, reqTypeStr, serverName, token string) ViewRequestInfo
type ViewResponseInfo ¶
type ViewResponseInfo interface {
// contains filtered or unexported methods
}
func NewViewResponseInfo ¶
func NewViewResponseInfo(serverName string, data []byte, respErr error) ViewResponseInfo
type Viewer ¶
type Viewer interface {
View(ViewRequestInfo) ViewResponseInfo
}
type ViewerMiddleware ¶
type WatchRequestInfo ¶
type WatchRequestInfo interface {
// contains filtered or unexported methods
}
func NewWatchRequestInfo ¶
func NewWatchRequestInfo(ctx context.Context, reqTypeStr, serverName, token, watchedObjectName string) WatchRequestInfo
type WatchResponseInfo ¶
type WatchResponseInfo interface { BytesChan() <-chan []byte TransferErrorChan() <-chan error Close() error // contains filtered or unexported methods }
func NewWatchResponseInfo ¶
type Watcher ¶
type Watcher interface {
Watch(WatchRequestInfo) WatchResponseInfo
}
func NewWatcher ¶
func NewWatcher(offstage offstageWatcher) Watcher
type WatcherMiddleware ¶
type WebServerConfigService ¶
type WebServerConfigService struct {
// contains filtered or unexported fields
}
func NewWebServerConfigService ¶
func NewWebServerConfigService(configuration configuration.Configuration, serverBinPath, logsDir string, log *ngLog.Log) WebServerConfigService
func (WebServerConfigService) ServerStatus ¶
func (w WebServerConfigService) ServerStatus() State
func (WebServerConfigService) ServerVersion ¶
func (w WebServerConfigService) ServerVersion() string
type WebServerInfo ¶
type WebServerInfo struct { Name string `json:"name"` Status State `json:"status"` Version string `json:"version"` }
func NewWebServerInfo ¶
func NewWebServerInfo(name string) WebServerInfo
Click to show internal directories.
Click to hide internal directories.