Documentation ¶
Index ¶
- Constants
- Variables
- func ColorsDefault() *render.ChartViewColors
- func GetChartRequest(chartID string) *render.GetChartRequest
- func NewEmptyBackend(healthy bool) backend.Backend
- func NewEmptyRecorder() metric.Recorder
- func RandomString(size int) string
- func RandomUUID(t *testing.T) uuid.UUID
- type ChartScale
- func (s *ChartScale) InvertRanges() *ChartScale
- func (s *ChartScale) SetCategoriesDomain() *ChartScale
- func (s *ChartScale) SetNoBoundariesOffset() *ChartScale
- func (s *ChartScale) SetNumericDomain() *ChartScale
- func (s *ChartScale) SetPaddings() *ChartScale
- func (s *ChartScale) SetRanges(rangeStart, rangeEnd int32) *ChartScale
- func (s *ChartScale) Unembed() *render.ChartScale
- func (s *ChartScale) UnsetDomain() *ChartScale
- func (s *ChartScale) UnsetKind() *ChartScale
- func (s *ChartScale) UnsetRanges() *ChartScale
- type ChartView
- func (v *ChartView) SetBadFillRGBColor() *ChartView
- func (v *ChartView) SetBarLabelPosition() *ChartView
- func (v *ChartView) SetDefaultBarBools() *ChartView
- func (v *ChartView) SetDefaultBarParams() *ChartView
- func (v *ChartView) SetDefaultColors() *ChartView
- func (v *ChartView) SetDefaultPointBools() *ChartView
- func (v *ChartView) SetDefaultPointParams() *ChartView
- func (v *ChartView) SetFillAndStrokeColor() *ChartView
- func (v *ChartView) Unembed() *render.ChartView
- func (v *ChartView) UnsetKind() *ChartView
- func (v *ChartView) UnsetValues() *ChartView
- type CreateChartRequest
- func (req *CreateChartRequest) AddAreaView() *CreateChartRequest
- func (req *CreateChartRequest) AddLineView() *CreateChartRequest
- func (req *CreateChartRequest) AddVerticalBarView() *CreateChartRequest
- func (req *CreateChartRequest) AddView(v *render.ChartView) *CreateChartRequest
- func (req *CreateChartRequest) SetBadMargins() *CreateChartRequest
- func (req *CreateChartRequest) SetBadSizes() *CreateChartRequest
- func (req *CreateChartRequest) SetBandBottomAxis() *CreateChartRequest
- func (req *CreateChartRequest) SetBottomAxisLabel() *CreateChartRequest
- func (req *CreateChartRequest) SetLeftAxisLabel() *CreateChartRequest
- func (req *CreateChartRequest) SetLinearLeftAxis() *CreateChartRequest
- func (req *CreateChartRequest) SetMargins() *CreateChartRequest
- func (req *CreateChartRequest) SetSizes() *CreateChartRequest
- func (req *CreateChartRequest) SetTitle() *CreateChartRequest
- func (req *CreateChartRequest) Unembed() *render.CreateChartRequest
- type EmptyBackend
- type EmptyRecorder
- type JSONChartScale
- type JSONChartView
- type JSONCreateChartRequest
- func (req *JSONCreateChartRequest) AddLineView() *JSONCreateChartRequest
- func (req *JSONCreateChartRequest) AddVerticalBarView() *JSONCreateChartRequest
- func (req *JSONCreateChartRequest) SetBandBottomAxis() *JSONCreateChartRequest
- func (req *JSONCreateChartRequest) SetBottomAxisLabel() *JSONCreateChartRequest
- func (req *JSONCreateChartRequest) SetLeftAxisLabel() *JSONCreateChartRequest
- func (req *JSONCreateChartRequest) SetLinearLeftAxis() *JSONCreateChartRequest
- func (req *JSONCreateChartRequest) SetMargins() *JSONCreateChartRequest
- func (req *JSONCreateChartRequest) SetSizes() *JSONCreateChartRequest
- func (req *JSONCreateChartRequest) SetTitle() *JSONCreateChartRequest
- func (req *JSONCreateChartRequest) Unembed() *view.CreateChartRequest
- type Opts
- type TestingChartRendererServer
Constants ¶
View Source
const ( // RendererConnTimeoutSecs represents connection timeout for testing renderer server. RendererConnTimeoutSecs = 2 // RendererRequestTimeoutSecs represents rendering timeout for testing renderer server. RendererRequestTimeoutSecs = 1 )
Variables ¶
View Source
var ErrRequestCancelled = errors.New("request to testing lc-renderer is cancelled")
ErrRequestCancelled contains error message about cancelled testing lc-renderer request.
Functions ¶
func ColorsDefault ¶
func ColorsDefault() *render.ChartViewColors
func GetChartRequest ¶
func GetChartRequest(chartID string) *render.GetChartRequest
func NewEmptyBackend ¶ added in v0.1.0
NewEmptyBackend returns a new TestingBackend.
func NewEmptyRecorder ¶ added in v0.1.0
NewEmptyRecorder returns a new EmptyRecorder.
func RandomString ¶ added in v0.1.0
Types ¶
type ChartScale ¶ added in v0.1.0
type ChartScale struct {
*render.ChartScale
}
func NewBandChartScale ¶ added in v0.1.0
func NewBandChartScale() *ChartScale
func NewLinearChartScale ¶ added in v0.1.0
func NewLinearChartScale() *ChartScale
func (*ChartScale) InvertRanges ¶ added in v0.1.0
func (s *ChartScale) InvertRanges() *ChartScale
func (*ChartScale) SetCategoriesDomain ¶ added in v0.1.0
func (s *ChartScale) SetCategoriesDomain() *ChartScale
func (*ChartScale) SetNoBoundariesOffset ¶ added in v0.1.0
func (s *ChartScale) SetNoBoundariesOffset() *ChartScale
func (*ChartScale) SetNumericDomain ¶ added in v0.1.0
func (s *ChartScale) SetNumericDomain() *ChartScale
func (*ChartScale) SetPaddings ¶ added in v0.1.0
func (s *ChartScale) SetPaddings() *ChartScale
func (*ChartScale) SetRanges ¶ added in v0.1.0
func (s *ChartScale) SetRanges(rangeStart, rangeEnd int32) *ChartScale
func (*ChartScale) Unembed ¶ added in v0.1.0
func (s *ChartScale) Unembed() *render.ChartScale
func (*ChartScale) UnsetDomain ¶ added in v0.1.0
func (s *ChartScale) UnsetDomain() *ChartScale
func (*ChartScale) UnsetKind ¶ added in v0.1.0
func (s *ChartScale) UnsetKind() *ChartScale
func (*ChartScale) UnsetRanges ¶ added in v0.1.0
func (s *ChartScale) UnsetRanges() *ChartScale
type ChartView ¶ added in v0.1.0
type ChartView struct {
*render.ChartView
}
func NewAreaView ¶ added in v0.1.0
func NewAreaView() *ChartView
func NewHorizontalBarView ¶ added in v0.1.0
func NewHorizontalBarView() *ChartView
func NewLineView ¶ added in v0.1.0
func NewLineView() *ChartView
func NewScatterView ¶ added in v0.1.0
func NewScatterView() *ChartView
func NewVerticalBarView ¶ added in v0.1.0
func NewVerticalBarView() *ChartView
func (*ChartView) SetBadFillRGBColor ¶ added in v0.1.0
func (*ChartView) SetBarLabelPosition ¶ added in v0.1.0
func (*ChartView) SetDefaultBarBools ¶ added in v0.1.0
func (*ChartView) SetDefaultBarParams ¶ added in v0.1.0
func (*ChartView) SetDefaultColors ¶ added in v0.1.0
func (*ChartView) SetDefaultPointBools ¶ added in v0.1.0
func (*ChartView) SetDefaultPointParams ¶ added in v0.1.0
func (*ChartView) SetFillAndStrokeColor ¶ added in v0.1.0
func (*ChartView) UnsetValues ¶ added in v0.1.0
type CreateChartRequest ¶ added in v0.1.0
type CreateChartRequest struct {
*render.CreateChartRequest
}
func NewCreateChartRequest ¶ added in v0.1.0
func NewCreateChartRequest() *CreateChartRequest
func (*CreateChartRequest) AddAreaView ¶ added in v0.1.0
func (req *CreateChartRequest) AddAreaView() *CreateChartRequest
func (*CreateChartRequest) AddLineView ¶ added in v0.1.0
func (req *CreateChartRequest) AddLineView() *CreateChartRequest
func (*CreateChartRequest) AddVerticalBarView ¶ added in v0.1.0
func (req *CreateChartRequest) AddVerticalBarView() *CreateChartRequest
func (*CreateChartRequest) AddView ¶ added in v0.1.0
func (req *CreateChartRequest) AddView(v *render.ChartView) *CreateChartRequest
func (*CreateChartRequest) SetBadMargins ¶ added in v0.1.0
func (req *CreateChartRequest) SetBadMargins() *CreateChartRequest
func (*CreateChartRequest) SetBadSizes ¶ added in v0.1.0
func (req *CreateChartRequest) SetBadSizes() *CreateChartRequest
func (*CreateChartRequest) SetBandBottomAxis ¶ added in v0.1.0
func (req *CreateChartRequest) SetBandBottomAxis() *CreateChartRequest
func (*CreateChartRequest) SetBottomAxisLabel ¶ added in v0.1.0
func (req *CreateChartRequest) SetBottomAxisLabel() *CreateChartRequest
func (*CreateChartRequest) SetLeftAxisLabel ¶ added in v0.1.0
func (req *CreateChartRequest) SetLeftAxisLabel() *CreateChartRequest
func (*CreateChartRequest) SetLinearLeftAxis ¶ added in v0.1.0
func (req *CreateChartRequest) SetLinearLeftAxis() *CreateChartRequest
func (*CreateChartRequest) SetMargins ¶ added in v0.1.0
func (req *CreateChartRequest) SetMargins() *CreateChartRequest
func (*CreateChartRequest) SetSizes ¶ added in v0.1.0
func (req *CreateChartRequest) SetSizes() *CreateChartRequest
func (*CreateChartRequest) SetTitle ¶ added in v0.1.0
func (req *CreateChartRequest) SetTitle() *CreateChartRequest
func (*CreateChartRequest) Unembed ¶ added in v0.1.0
func (req *CreateChartRequest) Unembed() *render.CreateChartRequest
type EmptyBackend ¶ added in v0.1.0
type EmptyBackend struct {
// contains filtered or unexported fields
}
EmptyBackend represents a backend.Backend that doesn't have real connections.
func (*EmptyBackend) IsHealthy ¶ added in v0.1.0
func (b *EmptyBackend) IsHealthy() bool
func (*EmptyBackend) RendererClient ¶ added in v0.1.0
func (b *EmptyBackend) RendererClient() render.ChartRendererClient
func (*EmptyBackend) RendererRequestTimeout ¶ added in v0.1.0
func (b *EmptyBackend) RendererRequestTimeout() time.Duration
func (*EmptyBackend) Shutdown ¶ added in v0.1.0
func (b *EmptyBackend) Shutdown()
type EmptyRecorder ¶ added in v0.1.0
type EmptyRecorder struct {
// contains filtered or unexported fields
}
EmptyRecorder represents testing metric recorder.
func (*EmptyRecorder) HTTPHandler ¶ added in v0.1.0
func (er *EmptyRecorder) HTTPHandler() http.Handler
HTTPHandler returns default Prometheus HTTP handler.
func (*EmptyRecorder) RequestDuration ¶ added in v0.1.0
func (er *EmptyRecorder) RequestDuration() *prometheus.HistogramVec
RequestDuration returns unregistered request_duration_seconds metric.
type JSONChartScale ¶ added in v0.1.0
type JSONChartScale struct {
*view.ChartScale
}
func NewJSONBandChartScale ¶ added in v0.1.0
func NewJSONBandChartScale() *JSONChartScale
func NewJSONLinearChartScale ¶ added in v0.1.0
func NewJSONLinearChartScale() *JSONChartScale
func (*JSONChartScale) SetNoBoundariesOffset ¶ added in v0.1.0
func (s *JSONChartScale) SetNoBoundariesOffset() *JSONChartScale
func (*JSONChartScale) SetTwoDomains ¶ added in v0.1.0
func (s *JSONChartScale) SetTwoDomains() *JSONChartScale
func (*JSONChartScale) Unembed ¶ added in v0.1.0
func (s *JSONChartScale) Unembed() *view.ChartScale
type JSONChartView ¶ added in v0.1.0
func NewJSONAreaView ¶ added in v0.1.0
func NewJSONAreaView() *JSONChartView
func NewJSONHorizontalBarView ¶ added in v0.1.0
func NewJSONHorizontalBarView() *JSONChartView
func NewJSONLineView ¶ added in v0.1.0
func NewJSONLineView() *JSONChartView
func NewJSONVerticalBarView ¶ added in v0.1.0
func NewJSONVerticalBarView() *JSONChartView
func (*JSONChartView) SetBadPointsCount ¶ added in v0.1.0
func (v *JSONChartView) SetBadPointsCount() *JSONChartView
func (*JSONChartView) SetPointsValues ¶ added in v0.1.0
func (v *JSONChartView) SetPointsValues() *JSONChartView
func (*JSONChartView) SetScalarValues ¶ added in v0.1.0
func (v *JSONChartView) SetScalarValues() *JSONChartView
func (*JSONChartView) Unembed ¶ added in v0.1.0
func (v *JSONChartView) Unembed() *view.ChartView
func (*JSONChartView) UnsetValues ¶ added in v0.1.0
func (v *JSONChartView) UnsetValues() *JSONChartView
type JSONCreateChartRequest ¶ added in v0.1.0
type JSONCreateChartRequest struct {
*view.CreateChartRequest
}
func NewJSONCreateChartRequest ¶ added in v0.1.0
func NewJSONCreateChartRequest() *JSONCreateChartRequest
func (*JSONCreateChartRequest) AddLineView ¶ added in v0.1.0
func (req *JSONCreateChartRequest) AddLineView() *JSONCreateChartRequest
func (*JSONCreateChartRequest) AddVerticalBarView ¶ added in v0.1.0
func (req *JSONCreateChartRequest) AddVerticalBarView() *JSONCreateChartRequest
func (*JSONCreateChartRequest) SetBandBottomAxis ¶ added in v0.1.0
func (req *JSONCreateChartRequest) SetBandBottomAxis() *JSONCreateChartRequest
func (*JSONCreateChartRequest) SetBottomAxisLabel ¶ added in v0.1.0
func (req *JSONCreateChartRequest) SetBottomAxisLabel() *JSONCreateChartRequest
func (*JSONCreateChartRequest) SetLeftAxisLabel ¶ added in v0.1.0
func (req *JSONCreateChartRequest) SetLeftAxisLabel() *JSONCreateChartRequest
func (*JSONCreateChartRequest) SetLinearLeftAxis ¶ added in v0.1.0
func (req *JSONCreateChartRequest) SetLinearLeftAxis() *JSONCreateChartRequest
func (*JSONCreateChartRequest) SetMargins ¶ added in v0.1.0
func (req *JSONCreateChartRequest) SetMargins() *JSONCreateChartRequest
func (*JSONCreateChartRequest) SetSizes ¶ added in v0.1.0
func (req *JSONCreateChartRequest) SetSizes() *JSONCreateChartRequest
func (*JSONCreateChartRequest) SetTitle ¶ added in v0.1.0
func (req *JSONCreateChartRequest) SetTitle() *JSONCreateChartRequest
func (*JSONCreateChartRequest) Unembed ¶ added in v0.1.0
func (req *JSONCreateChartRequest) Unembed() *view.CreateChartRequest
type TestingChartRendererServer ¶
type TestingChartRendererServer struct { render.UnimplementedChartRendererServer // contains filtered or unexported fields }
TestingChartRendererServer implements render.ChartRendererServer.
func NewTestingChartRendererServer ¶
func NewTestingChartRendererServer(opts Opts) (*TestingChartRendererServer, error)
NewTestingChartRendererServer returns a new TestingChartRendererServer.
func (*TestingChartRendererServer) Address ¶
func (s *TestingChartRendererServer) Address() string
Address returns listener address.
func (*TestingChartRendererServer) RenderChart ¶
func (s *TestingChartRendererServer) RenderChart(ctx context.Context, req *render.RenderChartRequest) (*render.RenderChartReply, error)
RenderChart implements render.ChartRendererServer.RenderChart.
Click to show internal directories.
Click to hide internal directories.