api

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package api provides the api for the explorer service.

Index

Constants

View Source
const HealthCheck string = "/health-check"

HealthCheck is the health check endpoint.

Variables

This section is empty.

Functions

func InitDB

func InitDB(ctx context.Context, address string, readOnly bool) (db.ConsumerDB, error)

InitDB initializes a database given a database type and path.

func Start

func Start(ctx context.Context, cfg Config) error

Start starts the api server.

Types

type Config

type Config struct {
	// HTTPPort is the http port for the api
	HTTPPort uint16
	// Address is the address of the database
	Address string
	// ScribeURL is the url of the scribe service
	ScribeURL string
}

Config contains the config for the api.

Jump to

Keyboard shortcuts

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