Documentation
¶
Index ¶
- type Body
- type Connection
- type ConnectionAuth
- type DynamicContent
- type DynamicExecutionField
- type DynamicExecutionPayload
- type Elevator
- type ElevatorEngine
- func (e *ElevatorEngine) CreateRequest(req Request) *room.Request
- func (e *ElevatorEngine) DynamicExecute(roomKey, requestKey string, v any) (room.Response, error)
- func (e *ElevatorEngine) Execute(roomKey, requestKey string) (room.Response, error)
- func (e *ElevatorEngine) ExecuteConcurrent(concurrentKey string, appliedRooms ...string) map[string]room.Response
- func (e *ElevatorEngine) GetElapsedTime() float64
- func (e *ElevatorEngine) PutBodyParser(roomKey, requestKey string, bodyParser room.IBodyParser) IElevatorEngine
- func (e *ElevatorEngine) PutQuery(roomKey, requestKey string, query room.IQuery) IElevatorEngine
- func (e *ElevatorEngine) Request(roomKey, requestKey string) (*room.Request, error)
- func (e *ElevatorEngine) WarmUp() IElevatorEngine
- type Flat
- type IElevator
- type IElevatorEngine
- type IntegrationConfig
- type Request
- type Room
- type RoomContainer
- type RoomResponseContainer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Body ¶
type Body struct { Type string `yaml:"type"` Content any `yaml:"content"` DynamicContent []DynamicContent `yaml:"dynamicContent"` }
type Connection ¶
type Connection struct { BaseURL string `yaml:"baseUrl"` Timeout int `yaml:"timeout"` Headers map[string]any `yaml:"headers"` Auth ConnectionAuth `yaml:"auth"` }
type ConnectionAuth ¶
type DynamicContent ¶ added in v1.2.0
type DynamicExecutionField ¶ added in v1.2.0
type DynamicExecutionPayload ¶ added in v1.2.0
func NewDynamicExecutionPayload ¶ added in v1.2.0
func NewDynamicExecutionPayload(v any) DynamicExecutionPayload
type Elevator ¶
type Elevator struct {
Config IntegrationConfig
}
func NewElevator ¶
func (Elevator) GetRequest ¶ added in v1.2.0
type ElevatorEngine ¶
type ElevatorEngine struct { Segment segment.ISegment RoomContainers map[string]RoomContainer // contains filtered or unexported fields }
func (*ElevatorEngine) CreateRequest ¶
func (e *ElevatorEngine) CreateRequest(req Request) *room.Request
func (*ElevatorEngine) DynamicExecute ¶ added in v1.2.0
func (*ElevatorEngine) Execute ¶
func (e *ElevatorEngine) Execute(roomKey, requestKey string) (room.Response, error)
func (*ElevatorEngine) ExecuteConcurrent ¶
func (*ElevatorEngine) GetElapsedTime ¶
func (e *ElevatorEngine) GetElapsedTime() float64
func (*ElevatorEngine) PutBodyParser ¶
func (e *ElevatorEngine) PutBodyParser(roomKey, requestKey string, bodyParser room.IBodyParser) IElevatorEngine
func (*ElevatorEngine) PutQuery ¶
func (e *ElevatorEngine) PutQuery(roomKey, requestKey string, query room.IQuery) IElevatorEngine
func (*ElevatorEngine) Request ¶ added in v1.2.0
func (e *ElevatorEngine) Request(roomKey, requestKey string) (*room.Request, error)
func (*ElevatorEngine) WarmUp ¶
func (e *ElevatorEngine) WarmUp() IElevatorEngine
TODO remove panics by a parameter
type IElevatorEngine ¶
type IElevatorEngine interface { Execute(roomKey, requestKey string) (room.Response, error) DynamicExecute(roomKey, requestKey string, v any) (room.Response, error) ExecuteConcurrent(concurrentKey string, appliedRooms ...string) map[string]room.Response WarmUp() IElevatorEngine PutBodyParser(roomKey, requestKey string, bodyParser room.IBodyParser) IElevatorEngine PutQuery(roomKey, requestKey string, authStrategy room.IQuery) IElevatorEngine GetElapsedTime() float64 Request(roomKey, requestKey string) (*room.Request, error) }
func NewElevatorEngine ¶
func NewElevatorEngine(elevator Elevator) IElevatorEngine
type IntegrationConfig ¶
type IntegrationConfig struct {
Flat Flat `yaml:"flat"`
}
func (*IntegrationConfig) UnmarshalJSON ¶
func (r *IntegrationConfig) UnmarshalJSON(data []byte) error
type Room ¶
type Room struct { Connection Connection `yaml:"connection"` Requests map[string]Request `yaml:"requests"` }
type RoomContainer ¶
type RoomResponseContainer ¶
type RoomResponseContainer struct { Responses map[string]room.Response // contains filtered or unexported fields }
func (*RoomResponseContainer) PutResponse ¶
func (c *RoomResponseContainer) PutResponse(key string, response room.Response)
Click to show internal directories.
Click to hide internal directories.