Documentation ¶
Index ¶
- type Args
- type Behavior
- type NoSessionServer
- func (s *NoSessionServer) Addr() net.Addr
- func (s *NoSessionServer) Close() error
- func (s *NoSessionServer) GetState() interface{}
- func (s *NoSessionServer) HandleListEntry(c context.Context, r *listentry.HandleListEntryRequest) (*adptModel.CheckResult, error)
- func (s *NoSessionServer) HandleMetric(c context.Context, r *metric.HandleMetricRequest) (*adptModel.ReportResult, error)
- func (s *NoSessionServer) HandleQuota(c context.Context, r *quota.HandleQuotaRequest) (*adptModel.QuotaResult, error)
- func (s *NoSessionServer) Run()
- func (s *NoSessionServer) Wait() error
- type Requests
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Args ¶
type Args struct { // manipulate the behavior of the backend. Behavior *Behavior // observed inputs by the backend Requests *Requests }
Args specify captured requests and programmed behaviour
type Behavior ¶
type Behavior struct { ValidateResponse *adptModel.ValidateResponse ValidateError error CreateSessionResponse *adptModel.CreateSessionResponse CreateSessionError error CloseSessionResponse *adptModel.CloseSessionResponse CloseSessionError error // report metric IBP HandleMetricResult *adptModel.ReportResult HandleMetricError error // check listEntry IBP HandleListEntryResult *adptModel.CheckResult HandleListEntryError error // quota IBP HandleQuotaResult *adptModel.QuotaResult HandleQuotaError error }
Behavior specifies programmed behaviour
type NoSessionServer ¶
type NoSessionServer struct { Behavior *Behavior Requests *Requests // contains filtered or unexported fields }
NoSessionServer models no session adapter backend.
func (*NoSessionServer) Addr ¶
func (s *NoSessionServer) Addr() net.Addr
Addr returns the listening address of the server
func (*NoSessionServer) Close ¶
func (s *NoSessionServer) Close() error
Close gracefully shuts down the server
func (*NoSessionServer) GetState ¶
func (s *NoSessionServer) GetState() interface{}
GetState returns the adapters observed state.
func (*NoSessionServer) HandleListEntry ¶
func (s *NoSessionServer) HandleListEntry(c context.Context, r *listentry.HandleListEntryRequest) (*adptModel.CheckResult, error)
HandleListEntry records listrequest and responds with the programmed response
func (*NoSessionServer) HandleMetric ¶
func (s *NoSessionServer) HandleMetric(c context.Context, r *metric.HandleMetricRequest) (*adptModel.ReportResult, error)
HandleMetric records metric entries and responds with the programmed response
func (*NoSessionServer) HandleQuota ¶
func (s *NoSessionServer) HandleQuota(c context.Context, r *quota.HandleQuotaRequest) (*adptModel.QuotaResult, error)
HandleQuota records quotarequest and responds with the programmed response
type Requests ¶
type Requests struct { ValidateRequest []*adptModel.ValidateRequest CreateSessionRequest []*adptModel.CreateSessionRequest CloseSessionRequest []*adptModel.CloseSessionRequest HandleMetricRequest []*metric.HandleMetricRequest HandleListEntryRequest []*listentry.HandleListEntryRequest HandleQuotaRequest []*quota.HandleQuotaRequest // contains filtered or unexported fields }
Requests record captured requests by the spy
Click to show internal directories.
Click to hide internal directories.