configuratorapi

package
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const Hostname = "configurator.core"

Hostname is the default hostname of the microservice.

Variables

View Source
var (
	// HINT: Insert endpoint definitions here
	Values     = Def{Method: "ANY", Route: `:888/values`}    // MARKER: Values
	Refresh    = Def{Method: "ANY", Route: `:444/refresh`}   // MARKER: Refresh
	SyncRepo   = Def{Method: "ANY", Route: `:888/sync-repo`} // MARKER: SyncRepo
	Values443  = Def{Method: "ANY", Route: `:443/values`}    // MARKER: Values443
	Refresh443 = Def{Method: "ANY", Route: `:443/refresh`}   // MARKER: Refresh443
	Sync443    = Def{Method: "ANY", Route: `:443/sync`}      // MARKER: Sync443
)

Functions

This section is empty.

Types

type Client

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

Client is a lightweight proxy for making unicast calls to the microservice.

func NewClient

func NewClient(caller service.Publisher) Client

NewClient creates a new unicast client proxy to the microservice.

func (Client) ForHost

func (_c Client) ForHost(host string) Client

ForHost returns a copy of the client with a different hostname to be applied to requests.

func (Client) Refresh

func (_c Client) Refresh(ctx context.Context) (err error)

Refresh tells all microservices to contact the configurator and refresh their configs. An error is returned if any of the values sent to the microservices fails validation.

func (Client) Refresh443 added in v1.13.1

func (_c Client) Refresh443(ctx context.Context) (err error)

Deprecated.

func (Client) Sync443 added in v1.13.1

func (_c Client) Sync443(ctx context.Context, timestamp time.Time, values map[string]map[string]string) (err error)

Deprecated.

func (Client) SyncRepo added in v1.13.1

func (_c Client) SyncRepo(ctx context.Context, timestamp time.Time, values map[string]map[string]string) (err error)

SyncRepo is used to synchronize values among replica peers of the configurator.

func (Client) Values

func (_c Client) Values(ctx context.Context, names []string) (values map[string]string, err error)

Values returns the values associated with the specified config property names for the caller microservice.

func (Client) Values443 added in v1.13.1

func (_c Client) Values443(ctx context.Context, names []string) (values map[string]string, err error)

Deprecated.

func (Client) WithOptions added in v1.13.1

func (_c Client) WithOptions(opts ...pub.Option) Client

WithOptions returns a copy of the client with options to be applied to requests.

type Def added in v1.23.0

type Def struct {
	Method string
	Route  string
}

Def defines an endpoint of the microservice.

func (*Def) URL added in v1.23.0

func (d *Def) URL() string

URL is the full URL to the endpoint.

type Hook added in v1.22.0

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

Hook assists in the subscription to the events of the microservice.

func NewHook added in v1.22.0

func NewHook(listener service.Subscriber) Hook

NewHook creates a new hook to the events of the microservice.

func (Hook) ForHost added in v1.22.0

func (c Hook) ForHost(host string) Hook

ForHost returns a copy of the hook with a different hostname to be applied to the subscription.

func (Hook) WithOptions added in v1.22.0

func (c Hook) WithOptions(opts ...sub.Option) Hook

WithOptions returns a copy of the hook with options to be applied to subscriptions.

type MulticastClient

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

MulticastClient is a lightweight proxy for making multicast calls to the microservice.

func NewMulticastClient

func NewMulticastClient(caller service.Publisher) MulticastClient

NewMulticastClient creates a new multicast client proxy to the microservice.

func (MulticastClient) ForHost

func (_c MulticastClient) ForHost(host string) MulticastClient

ForHost returns a copy of the client with a different hostname to be applied to requests.

func (MulticastClient) Refresh

Refresh tells all microservices to contact the configurator and refresh their configs. An error is returned if any of the values sent to the microservices fails validation.

func (MulticastClient) Refresh443 added in v1.13.1

Deprecated.

func (MulticastClient) Sync443 added in v1.13.1

func (_c MulticastClient) Sync443(ctx context.Context, timestamp time.Time, values map[string]map[string]string) iter.Seq[*Sync443Response]

Deprecated.

func (MulticastClient) SyncRepo added in v1.13.1

func (_c MulticastClient) SyncRepo(ctx context.Context, timestamp time.Time, values map[string]map[string]string) iter.Seq[*SyncRepoResponse]

SyncRepo is used to synchronize values among replica peers of the configurator.

func (MulticastClient) Values

func (_c MulticastClient) Values(ctx context.Context, names []string) iter.Seq[*ValuesResponse]

Values returns the values associated with the specified config property names for the caller microservice.

func (MulticastClient) Values443 added in v1.13.1

func (_c MulticastClient) Values443(ctx context.Context, names []string) iter.Seq[*Values443Response]

Deprecated.

func (MulticastClient) WithOptions added in v1.13.1

func (_c MulticastClient) WithOptions(opts ...pub.Option) MulticastClient

WithOptions returns a copy of the client with options to be applied to requests.

type MulticastTrigger added in v1.22.0

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

MulticastTrigger is a lightweight proxy for triggering the events of the microservice.

func NewMulticastTrigger added in v1.22.0

func NewMulticastTrigger(caller service.Publisher) MulticastTrigger

NewMulticastTrigger creates a new multicast trigger of events of the microservice.

func (MulticastTrigger) ForHost added in v1.22.0

func (_c MulticastTrigger) ForHost(host string) MulticastTrigger

ForHost returns a copy of the trigger with a different hostname to be applied to requests.

func (MulticastTrigger) WithOptions added in v1.22.0

func (_c MulticastTrigger) WithOptions(opts ...pub.Option) MulticastTrigger

WithOptions returns a copy of the trigger with options to be applied to requests.

type Refresh443In added in v1.13.1

type Refresh443In struct {
}

Refresh443In are the input arguments of Refresh443.

type Refresh443Out added in v1.13.1

type Refresh443Out struct {
}

Refresh443Out are the output arguments of Refresh443.

type Refresh443Response added in v1.13.1

type Refresh443Response multicastResponse // MARKER: Refresh443

Refresh443Response packs the response of Refresh443.

func (*Refresh443Response) Get added in v1.13.1

func (_res *Refresh443Response) Get() (err error)

Get unpacks the return arguments of Refresh443.

type RefreshIn

type RefreshIn struct {
}

RefreshIn are the input arguments of Refresh.

type RefreshOut

type RefreshOut struct {
}

RefreshOut are the output arguments of Refresh.

type RefreshResponse

type RefreshResponse multicastResponse // MARKER: Refresh

RefreshResponse packs the response of Refresh.

func (*RefreshResponse) Get

func (_res *RefreshResponse) Get() (err error)

Get unpacks the return arguments of Refresh.

type Sync443In added in v1.13.1

type Sync443In struct {
	Timestamp time.Time                    `json:"timestamp,omitzero"`
	Values    map[string]map[string]string `json:"values,omitzero"`
}

Sync443In are the input arguments of Sync443.

type Sync443Out added in v1.13.1

type Sync443Out struct {
}

Sync443Out are the output arguments of Sync443.

type Sync443Response added in v1.13.1

type Sync443Response multicastResponse // MARKER: Sync443

Sync443Response packs the response of Sync443.

func (*Sync443Response) Get added in v1.13.1

func (_res *Sync443Response) Get() (err error)

Get unpacks the return arguments of Sync443.

type SyncRepoIn added in v1.13.1

type SyncRepoIn struct {
	Timestamp time.Time                    `json:"timestamp,omitzero"`
	Values    map[string]map[string]string `json:"values,omitzero"`
}

SyncRepoIn are the input arguments of SyncRepo.

type SyncRepoOut added in v1.13.1

type SyncRepoOut struct {
}

SyncRepoOut are the output arguments of SyncRepo.

type SyncRepoResponse added in v1.13.1

type SyncRepoResponse multicastResponse // MARKER: SyncRepo

SyncRepoResponse packs the response of SyncRepo.

func (*SyncRepoResponse) Get added in v1.13.1

func (_res *SyncRepoResponse) Get() (err error)

Get unpacks the return arguments of SyncRepo.

type Values443In added in v1.13.1

type Values443In struct {
	Names []string `json:"names,omitzero"`
}

Values443In are the input arguments of Values443.

type Values443Out added in v1.13.1

type Values443Out struct {
	Values map[string]string `json:"values,omitzero"`
}

Values443Out are the output arguments of Values443.

type Values443Response added in v1.13.1

type Values443Response multicastResponse // MARKER: Values443

Values443Response packs the response of Values443.

func (*Values443Response) Get added in v1.13.1

func (_res *Values443Response) Get() (values map[string]string, err error)

Get unpacks the return arguments of Values443.

type ValuesIn

type ValuesIn struct {
	Names []string `json:"names,omitzero"`
}

ValuesIn are the input arguments of Values.

type ValuesOut

type ValuesOut struct {
	Values map[string]string `json:"values,omitzero"`
}

ValuesOut are the output arguments of Values.

type ValuesResponse

type ValuesResponse multicastResponse // MARKER: Values

ValuesResponse packs the response of Values.

func (*ValuesResponse) Get

func (_res *ValuesResponse) Get() (values map[string]string, err error)

Get unpacks the return arguments of Values.

Jump to

Keyboard shortcuts

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