Documentation
¶
Index ¶
- Constants
- func Register(controller *v1alpha1.CloudStream)
- type APIServerConnection
- type ContainerLogsConnection
- func (l *ContainerLogsConnection) EdgePeerDone() <-chan struct{}
- func (l *ContainerLogsConnection) GetMessageID() uint64
- func (l *ContainerLogsConnection) SendConnection() (stream.EdgedConnection, error)
- func (l *ContainerLogsConnection) Serve() error
- func (l *ContainerLogsConnection) SetEdgePeerDone()
- func (l *ContainerLogsConnection) SetMessageID(id uint64)
- func (l *ContainerLogsConnection) String() string
- func (l *ContainerLogsConnection) WriteToAPIServer(p []byte) (n int, err error)
- func (l *ContainerLogsConnection) WriteToTunnel(m *stream.Message) error
- type Session
- func (s *Session) AddAPIServerConnection(ss *StreamServer, connection APIServerConnection) (APIServerConnection, error)
- func (s *Session) Close()
- func (s *Session) DeleteAPIServerConnection(con APIServerConnection)
- func (s *Session) ProxyTunnelMessageToApiserver(message *stream.Message) error
- func (s *Session) Serve()
- func (s *Session) String() string
- func (s *Session) WriteMessageToTunnel(m *stream.Message) error
- type StreamServer
- type TunnelServer
Constants ¶
View Source
const ( CloudStreamModuleName = "cloudStream" CloudStreamGroupName = "cloudStream" )
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(controller *v1alpha1.CloudStream)
Types ¶
type APIServerConnection ¶
type APIServerConnection interface { fmt.Stringer // SendConnection indicates send EdgedConnection to edge SendConnection() (stream.EdgedConnection, error) // WriteToTunnel indicates writting message to tunnel WriteToTunnel(m *stream.Message) error // WriteToAPIServer indicates writting data to apiserver response WriteToAPIServer(p []byte) (n int, err error) // SetMessageID inidecates set messageid for it`s connection // Every APIServerConnection has his unique message id SetMessageID(id uint64) GetMessageID() uint64 // Serve indicates handling his own logic Serve() error // SetEdgePeerDone indicates send specifical message to let edge peer exist SetEdgePeerDone() // EdgePeerDone indicates whether edge peer ends EdgePeerDone() <-chan struct{} }
APIServerConnection indicates a connection request originally made by kube-apiserver to kubelet There are basically three types of connection requests : containersLogs, containerExec, Metric Cloudstream module first intercepts the connection request and then sends the request data through the tunnel (websocket) to edgestream module
type ContainerLogsConnection ¶
type ContainerLogsConnection struct { // MessageID indicate the unique id to create his message MessageID uint64 // contains filtered or unexported fields }
ContainerLogsConnection indicates the containerlogs request initiated by kube-apiserver
func (*ContainerLogsConnection) EdgePeerDone ¶
func (l *ContainerLogsConnection) EdgePeerDone() <-chan struct{}
func (*ContainerLogsConnection) GetMessageID ¶
func (l *ContainerLogsConnection) GetMessageID() uint64
func (*ContainerLogsConnection) SendConnection ¶
func (l *ContainerLogsConnection) SendConnection() (stream.EdgedConnection, error)
func (*ContainerLogsConnection) Serve ¶
func (l *ContainerLogsConnection) Serve() error
func (*ContainerLogsConnection) SetEdgePeerDone ¶
func (l *ContainerLogsConnection) SetEdgePeerDone()
func (*ContainerLogsConnection) SetMessageID ¶
func (l *ContainerLogsConnection) SetMessageID(id uint64)
func (*ContainerLogsConnection) String ¶
func (l *ContainerLogsConnection) String() string
func (*ContainerLogsConnection) WriteToAPIServer ¶
func (l *ContainerLogsConnection) WriteToAPIServer(p []byte) (n int, err error)
func (*ContainerLogsConnection) WriteToTunnel ¶
func (l *ContainerLogsConnection) WriteToTunnel(m *stream.Message) error
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session indicates one tunnel connection (default websocket) from edgecore And multiple kube-apiserver initiated requests to this edgecore
func (*Session) AddAPIServerConnection ¶
func (s *Session) AddAPIServerConnection(ss *StreamServer, connection APIServerConnection) (APIServerConnection, error)
func (*Session) DeleteAPIServerConnection ¶
func (s *Session) DeleteAPIServerConnection(con APIServerConnection)
func (*Session) ProxyTunnelMessageToApiserver ¶
type StreamServer ¶
type StreamServer struct {
// contains filtered or unexported fields
}
func (*StreamServer) Start ¶
func (s *StreamServer) Start()
type TunnelServer ¶
func (*TunnelServer) Start ¶
func (s *TunnelServer) Start()
Source Files
¶
Click to show internal directories.
Click to hide internal directories.