service

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIVersion = "serving.knative.dev/v1"
	Kind       = "Service"

	RoleLabel = "triggermesh.io/role"
)

Variables

This section is empty.

Functions

func New

func New(name, image, broker string, role Role, params map[string]string) triggermesh.Component

Types

type Role

type Role string
var (
	Producer Role = "source"
	Consumer Role = "target"
)

type Service

type Service struct {
	Name   string
	Broker string
	Image  string
	// contains filtered or unexported fields
}

func (*Service) AsDigitalOceanObject added in v1.2.0

func (s *Service) AsDigitalOceanObject(additionalEnvs map[string]string) (interface{}, error)

func (*Service) AsDockerComposeObject added in v1.2.0

func (s *Service) AsDockerComposeObject(additionalEnvs map[string]string) (interface{}, error)

func (*Service) AsK8sObject

func (s *Service) AsK8sObject() (kubernetes.Object, error)

func (*Service) AsKubernetesDeployment added in v1.4.0

func (s *Service) AsKubernetesDeployment(additionalEnvs map[string]string) (interface{}, error)

func (*Service) ConsumedEventTypes

func (s *Service) ConsumedEventTypes() ([]string, error)

func (*Service) GetAPIVersion

func (s *Service) GetAPIVersion() string

func (*Service) GetEventSource

func (s *Service) GetEventSource() (string, error)

func (*Service) GetEventTypes

func (s *Service) GetEventTypes() ([]string, error)

func (*Service) GetKind

func (s *Service) GetKind() string

func (*Service) GetName

func (s *Service) GetName() string

func (*Service) GetPort

func (s *Service) GetPort(ctx context.Context) (string, error)

func (*Service) GetSpec

func (s *Service) GetSpec() map[string]interface{}

func (*Service) Info

func (s *Service) Info(ctx context.Context) (*docker.Container, error)

func (*Service) IsSource

func (s *Service) IsSource() bool

func (*Service) IsTarget

func (s *Service) IsTarget() bool

func (*Service) Logs added in v1.2.0

func (s *Service) Logs(ctx context.Context, since time.Time, follow bool) (io.ReadCloser, error)

func (*Service) SetEventAttributes

func (s *Service) SetEventAttributes(attributes map[string]string) error

func (*Service) SetSpec added in v1.2.0

func (s *Service) SetSpec(spec map[string]interface{})

func (*Service) Start

func (s *Service) Start(ctx context.Context, additionalEnvs map[string]string, restart bool) (*docker.Container, error)

func (*Service) Stop

func (s *Service) Stop(ctx context.Context) error

Jump to

Keyboard shortcuts

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