Documentation
¶
Index ¶
- Constants
- func CreateDeploymentEvent(deployment Deployment, timestamp time.Time) (entities.PipelineEvent, error)
- func NewJBossSource(ctx context.Context, log *logrus.Logger, cfg config.GenericConfig, ...) (sources.CloseableSource, error)
- type Config
- type Deployment
- type DeploymentContent
- type DeploymentEvent
- type Duration
- type JBossClient
- type JBossEventBuilder
- type JBossSource
- type ServletInfo
- type UndertowSubsystem
- type WildFlyPayload
- type WildFlyResponse
Constants ¶
const (
// Event types for JBoss/WildFly deployments
DeploymentStatusEvent = "jboss:deployment_status"
)
Variables ¶
This section is empty.
Functions ¶
func CreateDeploymentEvent ¶
func CreateDeploymentEvent(deployment Deployment, timestamp time.Time) (entities.PipelineEvent, error)
CreateDeploymentEvent creates a pipeline event from a deployment
func NewJBossSource ¶
func NewJBossSource( ctx context.Context, log *logrus.Logger, cfg config.GenericConfig, pipeline pipeline.IPipelineGroup, oasRouter *swagger.Router[fiber.Handler, fiber.Router], ) (sources.CloseableSource, error)
Types ¶
type Config ¶
type Config struct {
WildFlyURL string `json:"wildFlyUrl,omitempty"`
Username string `json:"username,omitempty"`
Password config.SecretSource `json:"password"`
PollingInterval Duration `json:"pollingInterval,omitempty"`
}
type Deployment ¶
type Deployment struct {
Name string `json:"name"`
RuntimeName string `json:"runtimeName"`
Status string `json:"status"`
Enabled bool `json:"enabled"`
Persistent bool `json:"persistent"`
Content []DeploymentContent `json:"content,omitempty"`
Subdeployment interface{} `json:"subdeployment,omitempty"`
Subsystem map[string]interface{} `json:"subsystem,omitempty"`
}
Deployment represents a JBoss/WildFly deployment with all available information
type DeploymentContent ¶
DeploymentContent represents the content hash information
type DeploymentEvent ¶
type DeploymentEvent struct {
Deployment Deployment `json:"deployment"`
Timestamp time.Time `json:"timestamp"`
EventType string `json:"eventType"`
}
DeploymentEvent represents a JBoss/WildFly deployment status event
type Duration ¶
Duration is a custom type that can unmarshal from JSON strings
func (*Duration) UnmarshalJSON ¶
type JBossClient ¶
type JBossClient struct {
// contains filtered or unexported fields
}
JBossClient handles HTTP digest authentication with JBoss/WildFly management interface
func NewJBossClient ¶
func NewJBossClient(baseURL, username, password string) (*JBossClient, error)
NewJBossClient creates a new JBoss client with digest authentication
func (*JBossClient) Close ¶
func (c *JBossClient) Close() error
Close closes the HTTP client (if needed)
func (*JBossClient) GetDeployments ¶
func (c *JBossClient) GetDeployments(s *JBossSource) ([]Deployment, error)
GetDeployments retrieves all deployments from WildFly
type JBossEventBuilder ¶
type JBossEventBuilder struct{}
JBossEventBuilder implements the EventBuilder interface for JBoss events
func NewJBossEventBuilder ¶
func NewJBossEventBuilder() *JBossEventBuilder
NewJBossEventBuilder creates a new JBoss event builder
func (*JBossEventBuilder) GetPipelineEvent ¶
func (b *JBossEventBuilder) GetPipelineEvent(ctx context.Context, data []byte) (entities.PipelineEvent, error)
GetPipelineEvent creates a pipeline event from raw data
type JBossSource ¶
type JBossSource struct {
// contains filtered or unexported fields
}
func (*JBossSource) Close ¶
func (s *JBossSource) Close() error
type ServletInfo ¶
type ServletInfo struct {
MaxRequestTime int `json:"maxRequestTime"`
MinRequestTime int `json:"minRequestTime"`
RequestCount int `json:"requestCount"`
ServletClass string `json:"servletClass"`
ServletName string `json:"servletName"`
TotalRequestTime int `json:"totalRequestTime"`
}
ServletInfo represents servlet information
type UndertowSubsystem ¶
type UndertowSubsystem struct {
ActiveSessions int `json:"activeSessions"`
ContextRoot string `json:"contextRoot"`
Server string `json:"server"`
SessionsCreated int `json:"sessionsCreated"`
VirtualHost string `json:"virtualHost"`
Servlet map[string]ServletInfo `json:"servlet,omitempty"`
}
UndertowSubsystem represents Undertow web server subsystem information
type WildFlyPayload ¶
type WildFlyPayload struct {
Operation string `json:"operation"`
Address interface{} `json:"address"`
Recursive bool `json:"recursive,omitempty"`
IncludeRuntime bool `json:"includeRuntime,omitempty"`
JSONPretty int `json:"jsonPretty"`
}
WildFlyPayload represents the management API request payload
type WildFlyResponse ¶
type WildFlyResponse struct {
Outcome string `json:"outcome"`
Result interface{} `json:"result,omitempty"`
FailureDescription string `json:"failureDescription,omitempty"`
}
WildFlyResponse represents the management API response