Documentation ¶
Index ¶
Constants ¶
View Source
const ( SockName = "/policysync.sock" OrchestratorId = "k8s" EndpointId = "eth0" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EndpointInfo ¶
type EndpointInfo struct {
// contains filtered or unexported fields
}
type JoinMetadata ¶
type JoinMetadata struct { EndpointID proto.WorkloadEndpointID // JoinUID is a correlator, used to match stop requests with join requests. JoinUID uint64 }
type JoinRequest ¶
type JoinRequest struct { JoinMetadata // C is the channel to send updates to the policy sync client. Processor closes the channel when the // workload endpoint is removed, or when a new JoinRequest is received for the same endpoint. If nil, indicates // the client wants to stop receiving updates. C chan<- proto.ToDataplane }
JoinRequest is sent to the Processor when a new socket connection is accepted by the GRPC server, it provides the channel used to send sync messages back to the server goroutine.
type LeaveRequest ¶
type LeaveRequest struct {
JoinMetadata
}
type Processor ¶
type Processor struct { Updates <-chan interface{} JoinUpdates chan interface{} // contains filtered or unexported fields }
func NewProcessor ¶
func NewProcessor(updates <-chan interface{}) *Processor
type Server ¶
type Server struct { JoinUpdates chan<- interface{} // contains filtered or unexported fields }
Server implements the API that each policy-sync agent connects to in order to get policy information. There is a single instance of the Server, it disambiguates connections from different clients by the credentials present in the gRPC request.
func (*Server) RegisterGrpc ¶
func (*Server) Sync ¶
func (s *Server) Sync(_ *proto.SyncRequest, stream proto.PolicySync_SyncServer) error
type UIDAllocator ¶
type UIDAllocator struct {
// contains filtered or unexported fields
}
func NewUIDAllocator ¶
func NewUIDAllocator() *UIDAllocator
func (*UIDAllocator) NextUID ¶
func (a *UIDAllocator) NextUID() uint64
Click to show internal directories.
Click to hide internal directories.