renderer

package
v2.260.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrInvalidRendererResponse

type ErrInvalidRendererResponse struct {
	// contains filtered or unexported fields
}

ErrInvalidRendererResponse is returned when the renderer service does not respond with a status 200

func (ErrInvalidRendererResponse) Code

Code returns the status code received from renderer if an error is returned

func (ErrInvalidRendererResponse) Error

Error should be called by the user to print out the stringified version of the error

type Renderer

type Renderer struct {
	HcCli *healthcheck.Client
}

Renderer represents a renderer client to interact with the dp-frontend-renderer

func New

func New(url string) *Renderer

New creates an instance of renderer with a default client

func NewWithHealthClient

func NewWithHealthClient(hcCli *healthcheck.Client) *Renderer

NewWithHealthClient creates a new instance of Renderer, reusing the URL and Clienter from the provided health check client.

func (*Renderer) Checker

func (r *Renderer) Checker(ctx context.Context, check *health.CheckState) error

Checker calls dataset api health endpoint and returns a check object to the caller.

func (*Renderer) Do

func (r *Renderer) Do(path string, b []byte) ([]byte, error)

Do sends a request to the renderer service to render a given template

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL