code: func NewEndpointFilter(ctx context.Channel, et EndpointType) *EndpointFilter {
  
  	// Retrieve channel peers
  	chPeers := ctx.EndpointConfig().ChannelPeers(ctx.ChannelID())
  	return &EndpointFilter{endpointType: et, ctx: ctx, chPeers: chPeers}
  
  }
docs: // NewEndpointFilter creates a new endpoint filter that is based on configuration.
  // If channel peer is not configured it will be selected by default.