Documentation
¶
Index ¶
- Constants
- Variables
- type Client
- func (_c Client) ForHost(host string) Client
- func (_c Client) Refresh(ctx context.Context) (err error)
- func (_c Client) Refresh443(ctx context.Context) (err error)
- func (_c Client) Sync443(ctx context.Context, timestamp time.Time, values map[string]map[string]string) (err error)
- func (_c Client) SyncRepo(ctx context.Context, timestamp time.Time, values map[string]map[string]string) (err error)
- func (_c Client) Values(ctx context.Context, names []string) (values map[string]string, err error)
- func (_c Client) Values443(ctx context.Context, names []string) (values map[string]string, err error)
- func (_c Client) WithOptions(opts ...pub.Option) Client
- type Def
- type Hook
- type MulticastClient
- func (_c MulticastClient) ForHost(host string) MulticastClient
- func (_c MulticastClient) Refresh(ctx context.Context) iter.Seq[*RefreshResponse]
- func (_c MulticastClient) Refresh443(ctx context.Context) iter.Seq[*Refresh443Response]
- func (_c MulticastClient) Sync443(ctx context.Context, timestamp time.Time, values map[string]map[string]string) iter.Seq[*Sync443Response]
- func (_c MulticastClient) SyncRepo(ctx context.Context, timestamp time.Time, values map[string]map[string]string) iter.Seq[*SyncRepoResponse]
- func (_c MulticastClient) Values(ctx context.Context, names []string) iter.Seq[*ValuesResponse]
- func (_c MulticastClient) Values443(ctx context.Context, names []string) iter.Seq[*Values443Response]
- func (_c MulticastClient) WithOptions(opts ...pub.Option) MulticastClient
- type MulticastTrigger
- type Refresh443In
- type Refresh443Out
- type Refresh443Response
- type RefreshIn
- type RefreshOut
- type RefreshResponse
- type Sync443In
- type Sync443Out
- type Sync443Response
- type SyncRepoIn
- type SyncRepoOut
- type SyncRepoResponse
- type Values443In
- type Values443Out
- type Values443Response
- type ValuesIn
- type ValuesOut
- type ValuesResponse
Constants ¶
const Hostname = "configurator.core"
Hostname is the default hostname of the microservice.
Variables ¶
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 (Client) ForHost ¶
ForHost returns a copy of the client with a different hostname to be applied to requests.
func (Client) 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 (Client) Refresh443 ¶ added in v1.13.1
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 ¶
Values returns the values associated with the specified config property names for the caller microservice.
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.
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 ¶
func (_c MulticastClient) Refresh(ctx context.Context) iter.Seq[*RefreshResponse]
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
func (_c MulticastClient) Refresh443(ctx context.Context) iter.Seq[*Refresh443Response]
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 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
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.
type ValuesIn ¶
type ValuesIn struct {
Names []string `json:"names,omitzero"`
}
ValuesIn are the input arguments of Values.
type ValuesResponse ¶
type ValuesResponse multicastResponse // MARKER: Values
ValuesResponse packs the response of Values.