Documentation ¶
Index ¶
- Variables
- type CommonSetup
- type CommonSetupFn
- type Formatters
- type Generator
- type Option
- func AsStatefulSet() Option
- func WithConfigMapGenerator(fn func(f Formatters, svc apis.Service) (string, error)) Option
- func WithFormatters(f Formatters) Option
- func WithImage(image string) Option
- func WithNamespace(name string) Option
- func WithPodTemplateSpecMutator(fn func(f Formatters, svc apis.Service, template *v1.PodTemplateSpec) error) Option
- func WithPort(p int) Option
- type OptionFn
- type ServiceGeneratorError
- type WorkloadGenerator
- type WorkloadGeneratorFn
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSerializer = json.NewSerializerWithOptions(json.DefaultMetaFactory, nil, nil, json.SerializerOptions{Yaml: true, Pretty: true, Strict: true})
Functions ¶
This section is empty.
Types ¶
type CommonSetup ¶
type CommonSetupFn ¶
func (CommonSetupFn) Generate ¶
func (f CommonSetupFn) Generate(svcs apis.ServiceGraph) ([]runtime.Object, []byte, error)
type Formatters ¶
type Formatters struct { BaseName string Name func(idx int) string Url func(idx int, port int) string }
func SimpleFormatters ¶
func SimpleFormatters(baseName string) Formatters
type Generator ¶
type Generator struct { CommonSetup CommonSetup WorkloadGenerator WorkloadGenerator Serializer *json.Serializer }
func NewGenerator ¶
type Option ¶
type Option interface {
Apply(g *generator) error
}
func AsStatefulSet ¶
func AsStatefulSet() Option
func WithConfigMapGenerator ¶
func WithFormatters ¶
func WithFormatters(f Formatters) Option
func WithNamespace ¶
func WithPodTemplateSpecMutator ¶
func WithPodTemplateSpecMutator(fn func(f Formatters, svc apis.Service, template *v1.PodTemplateSpec) error) Option
type ServiceGeneratorError ¶
type ServiceGeneratorError struct {
// contains filtered or unexported fields
}
func (*ServiceGeneratorError) Error ¶
func (s *ServiceGeneratorError) Error() string
func (*ServiceGeneratorError) Is ¶
func (s *ServiceGeneratorError) Is(target error) bool
func (*ServiceGeneratorError) Unwrap ¶
func (s *ServiceGeneratorError) Unwrap() error
type WorkloadGenerator ¶
Click to show internal directories.
Click to hide internal directories.