stream

package
v0.10.5 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stream

type Stream interface {
	grpc.ServerStream

	Send(*discovery.DiscoveryResponse) error
	Recv() (*discovery.DiscoveryRequest, error)
}

Generic RPC stream.

type StreamState

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

StreamState will keep track of resource state per type on a stream.

func NewStreamState

func NewStreamState(wildcard bool, initialResourceVersions map[string]string) StreamState

NewStreamState initializes a stream state.

func (*StreamState) GetKnownResourceNames

func (s *StreamState) GetKnownResourceNames(url string) map[string]struct{}

func (*StreamState) GetResourceVersions

func (s *StreamState) GetResourceVersions() map[string]string

func (*StreamState) IsFirst

func (s *StreamState) IsFirst() bool

func (*StreamState) IsWildcard

func (s *StreamState) IsWildcard() bool

func (*StreamState) SetKnownResourceNames

func (s *StreamState) SetKnownResourceNames(url string, names map[string]struct{})

func (*StreamState) SetKnownResourceNamesAsList

func (s *StreamState) SetKnownResourceNamesAsList(url string, names []string)

func (*StreamState) SetResourceVersions

func (s *StreamState) SetResourceVersions(resourceVersions map[string]string)

Jump to

Keyboard shortcuts

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