Documentation ¶
Index ¶
- Variables
- func AddConnectService(tg *nomadapi.TaskGroup, svc *nomadapi.Service, opts ...ServiceOption) *nomadapi.Service
- func AddPort(tg *nomadapi.TaskGroup, port nomadapi.Port)
- func AddService(tg *nomadapi.TaskGroup, svc *nomadapi.Service, opts ...ServiceOption) *nomadapi.Service
- func AddTask(tg *nomadapi.TaskGroup, task *nomadapi.Task, opts ...TaskOption) *nomadapi.Task
- func AddTaskGroup(job *nomadapi.Job, name string, count int) *nomadapi.TaskGroup
- func AllowHTTP(http *consul.IntentionHTTPPermission) *consul.IntentionPermission
- func AllowIntention(name string) *consul.SourceIntention
- func AppAwareIntention(name string, permissions ...*consul.IntentionPermission) *consul.SourceIntention
- func Bool(v bool) *bool
- func ConsulUpstream(dest string, port int) *nomad.ConsulUpstream
- func DenyAllHTTP() *consul.IntentionPermission
- func DenyHTTP(http *consul.IntentionHTTPPermission) *consul.IntentionPermission
- func DenyIntention(name string) *consul.SourceIntention
- func Duration(v time.Duration) *time.Duration
- func HTTPPathExact(path string) *consul.IntentionHTTPPermission
- func HTTPPathPrefix(prefix string) *consul.IntentionHTTPPermission
- func Image(repo, tagOrDigest string) string
- func Int(v int) *int
- func Logging(tag string) map[string]interface{}
- func NewBatchJob(name string, priority int) *nomadapi.Job
- func NewJob(name string, priority int) *nomadapi.Job
- func NewServiceDefaults(name string, protocol string) *consul.ServiceConfigEntry
- func NewServiceIntentions(name string, sources ...*consul.SourceIntention) *consul.ServiceIntentionsConfigEntry
- func NewSystemJob(name string, priority int) *nomadapi.Job
- func Register(app Deployable)
- func RegisteredImageURIs() []string
- func Registry() map[string]Deployable
- func String(v string) *string
- func WithEvents(ctx context.Context, events EventReporter) context.Context
- type Clients
- type Deployable
- type EventOption
- type EventReporter
- type ServiceOption
- type TaskOption
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultDNS = &nomadapi.DNSConfig{ Servers: []string{ "10.0.2.101", }, }
View Source
var DefaultDatacenters = []string{"dc1"}
Functions ¶
func AddConnectService ¶
func AddService ¶
func AddTaskGroup ¶
func AllowHTTP ¶
func AllowHTTP(http *consul.IntentionHTTPPermission) *consul.IntentionPermission
func AllowIntention ¶
func AllowIntention(name string) *consul.SourceIntention
func AppAwareIntention ¶
func AppAwareIntention(name string, permissions ...*consul.IntentionPermission) *consul.SourceIntention
func ConsulUpstream ¶
func ConsulUpstream(dest string, port int) *nomad.ConsulUpstream
func DenyAllHTTP ¶
func DenyAllHTTP() *consul.IntentionPermission
func DenyHTTP ¶
func DenyHTTP(http *consul.IntentionHTTPPermission) *consul.IntentionPermission
func DenyIntention ¶
func DenyIntention(name string) *consul.SourceIntention
func HTTPPathExact ¶
func HTTPPathExact(path string) *consul.IntentionHTTPPermission
func HTTPPathPrefix ¶
func HTTPPathPrefix(prefix string) *consul.IntentionHTTPPermission
func NewServiceDefaults ¶
func NewServiceDefaults(name string, protocol string) *consul.ServiceConfigEntry
func NewServiceIntentions ¶
func NewServiceIntentions(name string, sources ...*consul.SourceIntention) *consul.ServiceIntentionsConfigEntry
func Register ¶
func Register(app Deployable)
func RegisteredImageURIs ¶
func RegisteredImageURIs() []string
func Registry ¶
func Registry() map[string]Deployable
func WithEvents ¶
func WithEvents(ctx context.Context, events EventReporter) context.Context
Types ¶
type Clients ¶
func DefaultClients ¶
type Deployable ¶
type Deployable interface { Name() string Install(ctx context.Context, clients Clients) error Uninstall(ctx context.Context, clients Clients) error }
func Find ¶
func Find(name string) Deployable
type EventOption ¶
func EventArgsAndOptions ¶
func EventArgsAndOptions(v []interface{}) (args []interface{}, opts []EventOption)
func WithError ¶
func WithError(err error) EventOption
type EventReporter ¶
type EventReporter interface { Info(format string, v ...interface{}) Warning(format string, v ...interface{}) Error(format string, v ...interface{}) }
func Events ¶
func Events(ctx context.Context) EventReporter
func NewChannelEventReporter ¶
func NewChannelEventReporter(ch chan<- *deploypb.ReportEvent) EventReporter
func NewLoggingEventReporter ¶
func NewLoggingEventReporter() EventReporter
type ServiceOption ¶
func WithMetricsPort ¶
func WithMetricsPort(label string) ServiceOption
func WithMetricsScraping ¶
func WithMetricsScraping(path string) ServiceOption
func WithUpstreams ¶
func WithUpstreams(upstreams ...*nomadapi.ConsulUpstream) ServiceOption
type TaskOption ¶
func WithCPU ¶
func WithCPU(cpu int) TaskOption
func WithLoggingTag ¶
func WithLoggingTag(tag string) TaskOption
func WithMemoryMB ¶
func WithMemoryMB(memory int) TaskOption
func WithTracingEnv ¶
func WithTracingEnv() TaskOption
func WithVaultChangeNoop ¶
func WithVaultChangeNoop() TaskOption
func WithVaultPolicies ¶
func WithVaultPolicies(policies ...string) TaskOption
Source Files ¶
Click to show internal directories.
Click to hide internal directories.