services

package
v0.0.0-...-d2438c5 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	api.DefaultService
	// contains filtered or unexported fields
}

API defines a query API

func NewAPI

func NewAPI(name string, options ...Option) *API

NewAPI creates a API with sane defaults

func (*API) Name

func (a *API) Name() string

Name returns the API name

func (*API) Post

func (a *API) Post(ctx context.Context, req *http.Request) api.Response

Post defines a service for calling "POST" method and returns a response.

type MemberNodesAPI

type MemberNodesAPI struct {
	api.DefaultService
	// contains filtered or unexported fields
}

MemberNodesAPI defines a query MemberNodesAPI

func NewMemberNodesAPI

func NewMemberNodesAPI(name string, options ...Option) *MemberNodesAPI

NewMemberNodesAPI creates a MemberNodesAPI with sane defaults

func (*MemberNodesAPI) Delete

func (a *MemberNodesAPI) Delete(ctx context.Context, req *http.Request) api.Response

Delete defines a service for calling "DELETE" method and returns a response.

func (*MemberNodesAPI) Get

Get defines a service for calling "POST" method and returns a response. Return information about the cluster.

func (*MemberNodesAPI) Name

func (a *MemberNodesAPI) Name() string

Name returns the MemberNodesAPI name

func (*MemberNodesAPI) Post

func (a *MemberNodesAPI) Post(ctx context.Context, req *http.Request) api.Response

Post defines a service for calling "POST" method and returns a response.

type MembersAPI

type MembersAPI struct {
	api.DefaultService
	// contains filtered or unexported fields
}

MembersAPI defines a query MembersAPI

func NewMembersAPI

func NewMembersAPI(name string, options ...Option) *MembersAPI

NewMembersAPI creates a MembersAPI with sane defaults

func (*MembersAPI) Delete

func (a *MembersAPI) Delete(ctx context.Context, req *http.Request) api.Response

Delete defines a service for calling "DELETE" method and returns a response.

func (*MembersAPI) Get

func (a *MembersAPI) Get(ctx context.Context, req *http.Request) api.Response

Get defines a service for calling "POST" method and returns a response.

func (*MembersAPI) Name

func (a *MembersAPI) Name() string

Name returns the MembersAPI name

func (*MembersAPI) Post

func (a *MembersAPI) Post(ctx context.Context, req *http.Request) api.Response

Post defines a service for calling "POST" method and returns a response.

type Option

type Option func(*options)

Option to be passed to Connect to customize the resulting instance.

func WithClock

func WithClock(clock clock.Clock) Option

WithClock sets the clock on the option

func WithFileSystem

func WithFileSystem(fileSystem fsys.FileSystem) Option

WithFileSystem sets the fileSystem on the option

func WithLogger

func WithLogger(logger log.Logger) Option

WithLogger sets the logger on the option

type ServiceNode

type ServiceNode struct {
	ServerName    string `json:"server_name" yaml:"server_name"`
	ServerAddress string `json:"server_address" yaml:"server_address"`
	DaemonAddress string `json:"daemon_address" yaml:"daemon_address"`
	DaemonNonce   string `json:"daemon_nonce" yaml:"daemon_nonce"`
}

ServiceNode represents a request to update the node for the raft cluster

type ServiceResult

type ServiceResult struct {
	ServiceNode `json:",inline" yaml:",inline"`
	Status      string `json:"status" yaml:"status"`
	Message     string `json:"message" yaml:"message"`
}

ServiceResult represents a node part of the raft cluster

Jump to

Keyboard shortcuts

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