status

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const APIName = "hub"

APIName is the name of the API as defined in the design.

View Source
const APIVersion = "1.0"

APIVersion is the version of the API as defined in the design.

View Source
const ServiceName = "status"

ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.

Variables

View Source
var MethodNames = [1]string{"Status"}

MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.

Functions

func NewStatusEndpoint

func NewStatusEndpoint(s Service) goa.Endpoint

NewStatusEndpoint returns an endpoint function that calls the method "Status" of service "status".

Types

type Client

type Client struct {
	StatusEndpoint goa.Endpoint
}

Client is the "status" service client.

func NewClient

func NewClient(status goa.Endpoint) *Client

NewClient initializes a "status" service client given the endpoints.

func (*Client) Status

func (c *Client) Status(ctx context.Context) (res *StatusResult, err error)

Status calls the "Status" endpoint of the "status" service.

type Endpoints

type Endpoints struct {
	Status goa.Endpoint
}

Endpoints wraps the "status" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

NewEndpoints wraps the methods of the "status" service with endpoints.

func (*Endpoints) Use

func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint)

Use applies the given middleware to all the "status" service endpoints.

type HubService

type HubService struct {
	// Name of the service
	Name string
	// Status of the service
	Status string
	// Details of the error if any
	Error *string
}

Describes the services and their status

type Service

type Service interface {
	// Return status of the services
	Status(context.Context) (res *StatusResult, err error)
}

Describes the status of each service

type StatusResult

type StatusResult struct {
	// List of services and their status
	Services []*HubService
}

StatusResult is the result type of the status service Status method.

Jump to

Keyboard shortcuts

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